Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why so many instances of ASP.NET Development Server?

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?

like image 768
ProfK Avatar asked Apr 12 '11 15:04

ProfK


2 Answers

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:

  1. Select the web project
  2. Open the "Properties" window by pressing F4
  3. Change the Always Start When Debugging value to False
  4. Repeat steps 1-3 for any other web projects in your solution

Source: '"Always Start When Debugging" – Preventing multiple Visual Studio Development Servers from starting' by by Kevin Rintoul

like image 87
Adrian Clark Avatar answered Oct 19 '22 15:10

Adrian Clark


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.

like image 37
Eric Patrick Avatar answered Oct 19 '22 17:10

Eric Patrick