Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I configure IIS Express to run with VS2008?

I have the IIS Express Beta downloaded and installed on WinXP. I don't have VS2010.

How do I configure VS2008 to launch IIS Express Beta when debugging/running a site?

like image 633
Jay Stevens Avatar asked Dec 01 '10 16:12

Jay Stevens


People also ask

How do I configure IIS Express?

Configure IIS express on visual studioSelect the web application project and open properties -> select the web tab -> under server's select IIS express-> Specify the project URL. Now open the project folder and . vs folder (Hidden) -> Config -> applicationhost.


2 Answers

The following seems to work for IIS Express launching from the command line:

  1. Open the Properties for the web site

  2. Select Start Options

  3. Under Start Action select Start External Program, put the path to iisexpress.exe (C:\Program Files (x86)\IIS Express\iisexpress.exe)

  4. Command Line Arguments: /path:{path to the project solution} /clr:3.5

  5. Under Server, select Use Custom Server

  6. Base Url: http://localhost:8080/ (the default for IIS Express, you can change this with command line arguments)

  7. Important! Uncheck everything under Debuggers otherwise you'll get an error "Unable to start debugging on the web server..."

Information on launching using a config file can be found at this site: Debug Your .NET Web Project With IIS Express [Tips & Tricks]. This is VS2010 specific but I suspect the same will work for 2008.

like image 63
Peter Tate Avatar answered Nov 17 '22 07:11

Peter Tate


I'm trying to do the same however as there will be no direct vs2008 integration for iis express (they've only just added it to the vs2010 sp1 beta) to use it for testing/development you need to do the following.

  1. Start a website in iisexpress using the following command line (iisexpress command line parameters), change the $(ProjectDir) to be what you need it to be.

    "%programfiles%/iis express/iisexpress.exe" /path:$(ProjectDir) /port:4326 /clr:v2.0

  2. Attach the Visual Studio debugger to the iisexpress.exe process

  3. Browse to http://localhost:4326 or right click the iisexpress systray icon and select your site

Note: I've tried to hook this up as a post-build event in visual studio but if you use the cmd above then vs2008 hangs until iisexpress terminates. I've also tried using this with start /b or placing the cmd in a batch file and trying to start that but neither option works.

Thanks

Keith

like image 22
Keith K Avatar answered Nov 17 '22 07:11

Keith K