Starting with 2005, VS started this behavior of when starting debugging session it spawns up a webserver for every project in a solution. I have a solution with 15 projects so it takes a while and is a waste of resources. Is there a way to configure it differently besides just using IIS?

+3  A: 

Some details here on why it does it and how you can overcome it:

There are instances when you might have many web applications or web sites in the same solution and you may be actually debugging only one of them... In such scenario it might not be desirable to have multiple instances of ASP.NET Development Server running... VS provides an explicit setting in the property grid of web application/site called Development Web Server - "Always Start When Debugging" which is set to True by default... If you set this Property to be False only one web server instance will be created for the start up web project...


I have also been highly annoyed by that behavior. The only solution I have found is to manually change the properties page for each web appllication so it hits a real running instance in IIS.

I prefer this anyway, because debugging with the integrated web server can give you a very false impression of how your application will interact with the IIS security model.

Eric Z Beard
+1  A: 

In Visual Studio 2008, there is an entry on the Properties page for the project called "Always Start When Debugging".

Note you have to get to this by selecting the project and going to the Properties pane (or right-clicking Properties). This option is not present when you double-click the project and open it in the main editing pane.

VS by default sets this value to on for all your web projects. Turning it off will solve this problem.

[editorial]This is fairly annoying and I wish the default were false![/editorial]

+1  A: 

Set the web service project's "Always Start When Debugging" property to false. To get to the property, click on the project node and then hit F4 or click View | Properties Window (not Property Pages).

Be careful: this is not in the properties you reach by clicking the project node then clicking Properties; or by double-clicking the project's Properties sub-node; or by clicking View | Property Pages.

Also annoying is that this is property only persists as a user setting, in the .csproj.user file.

Steve Betten