Thursday, March 5, 2009

The web server process that was being debugged has been terminated by Internet Information Services (IIS)

By default, debugging a website or web project within Visual Studio bring up the built-in server of Visual Studio. But, we do have a problem to change the server to an IIS instance. I recently switched to debugging on IIS on my Windows 2008 Server Machine. Debugging works fine. The only problem is that if your code hit some breakpoint and if you leave the program in ‘break’ mode for more than 90 seconds, Visual Studio shows the following message:

image

After a bit tweaking around in the new IIS interface, I got the solution:

  1. image Open Internet Information Services (IIS) Manager.
  2. From the server tree (the item with the name as the server name), choose Application Pools.
  3. Choose the Application Pool corresponding to your testing IIS website (usually it has the same name as your IIS website)
  4. Right-click and choose Advanced Settings.
  5. From the Process Model node, change the Ping Maximum Response Time (seconds) to a comfortably higher value (I have set the value to 900 seconds which is 15 minutes).

Alternatively, you can also set the Ping Enabled property to False.

Apparently what happens is that the server keeps pinging the worker process and waits for a response. When in debugging mode, the worker process is affectively suspended, which results in the ping not being responded.

Technorati Tags: ,

del.icio.us Tags: ,

8 comments: