0 Replies - 426 Views - Last Post: 26 August 2012 - 10:02 PM Rate Topic: ***-- 1 Votes

#1 vadiveln  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 26-August 12

configure the web projects in IIS Express

Posted 26 August 2012 - 10:02 PM

i have tried to configure the web samples in IIS Express 7.5 and run it from IIS Express. From my search i have found that , all the changes will do by manually only. That is, In visual Studio, right click on project and select properties. Then select Using IIS Express and run it. i don't want to do this and all.

Steps completed
1. i have checked through c# coding if iis express is installed or not.
	if (IISExpress.IsIISExpress75Installed)
	                    {
	                        string arguments = string.Empty;
	                        string mvcSampleBrowser = GetStartUrl(true);
	                        arguments = string.Format("http://localhost:" + IISExpress.IISPortNo + "/{0}", GetStartUrl(true));
	                        StartProcess(StartupMode.IISxpress, arguments);
	                    }
	                    else
	                    {
	 
	                        StartProcess(StartupMode.FileSystem, Studio.CurrentVersion.VersionNumber);
	                    }



2. If IIS Express installed, samples will be hosted in the IIS Express server
	private static void StartProcess(StartupMode mode, string arguments)
	        {
	             if (mode == StartupMode.IISExpress)
	            {
	                Process.Start(arguments);
	            }
	            else if (mode == StartupMode.FileSystem)
	            {
	                LaunchSampleBrowserMVC lsbasp = new LaunchSampleBrowserMVC(Studio.CurrentVersion.VersionNumber, Studio.CurrentVersion.SamplesPath);
	                lsbasp.LaunchSampleBrowser();
	            }
	        }


The above code didnt help me at all.

How to configure the web samples into IIS Express using c#?

can anyone please help me.

Thanks in advance.

Is This A Good Question/Topic? 0
  • +

Page 1 of 1