I am debugging a large web application solution, with the main web application project as a single startup project, configured to use IIS for debugging. Whenever I run this application inside Visual Studio 2010, I still get multiple instances (sometimes over 15) of the ASP.NET Development Server starting up as well. Why does this occur?
Visual Studio has a setting in every Web Project's properties by default to start the development server when you are debugging. This enables, for example, a web project which contains Web Services to be available when you've selected a client web site or application to start.
If you do not want this behaviour follow these steps:
F4
Always Start When Debugging
value to False
Source: '"Always Start When Debugging" – Preventing multiple Visual Studio Development Servers from starting' by by Kevin Rintoul
A simple solution if you have many web projects in the same solution: from the Package Manager console:
get-project -all | %{ $_.Properties | ?{ $_.Name -eq "WebApplication.StartWebServerOnDebug" } | %{ $_.Value = $False} }
This will change all web projects Always Start When Debugging
setting to false with a single command.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With