HowTo: Setup IIS7 as development server in Visual Studio 2008

image_thumb3Webdevelopment with Visual Studio is really easy – just hit F5 and you jump into the debugger. VS use (as default) the built-in "ASP.NET Development Server" called "Cassini". But there are some pitfalls if you use this server, because the behavior of the IIS and Cassini are sometimes a bit different and the dev server is much slower! The good news: With few clicks you can debug and deploy your application right on IIS7 (on Vista/Server 2008).

Setup IIS
If you develop under Windows Vista (I have only a german Vista here – sorry)you can use the IIS7 – Win XP users have to use IIS6 (which I will not cover in this blogpost, but the way should be similar).

1. Install IIS 7
System Control -> Programs -> Windows Functions:

If you have not installed IIS7 click on the IIS-service checkbox:

image_thumb6

Important for us are the following settings: Add the ASP.NET Feature:

image_thumb9

… and for the Visual Studio "integration" you have to install these features:

image_thumb13 

image_thumb15

2. Edit Visual Studio Project

*right click* on the project and go to the properties:

image_thumb17

Save these settings and now hit F5 – done :)

Pros- & Cons about using IIS instead of Cassini
I recommand using IIS instead of Cassini, because it´s much faster and it´s more like the real deployment server. Look at these two questions on stackoverflow.com to see what other developers think about it: this link or this link.

kick it on DotNetKicks.com

3 Comments so far »

  1. Dew Drop - March 24, 2009 | Alvin Ashcraft's Morning Dew said

    am March 24 2009 @ 3:03 pm

    [...] HowTo: Setup IIS7 as development server in Visual Studio 2008 (Robert Muehsig) [...]

  2. Magnus said

    am May 21 2009 @ 10:06 am

    Super. Nice guide. Solved all my issues in 2 secs! I just had to translate your german version into english :-)

  3. Jaap said

    am August 10 2009 @ 10:46 pm

    Nice, BUT, you can’t use Edit & Continue debuggin when you’ve attached to IIS. Microsoft should allow running IIS as a hosted process so Visual Studio can enable Edit & Continue…

Comment RSS · TrackBack URI

Leave a comment

Name: (Required)

eMail: (Required)

Website:

Comment: