Wednesday, April 11, 2012

Visual Studio debugging terminated - IIS terminated web server process during debugging - Application poll ping settings in IIS

 

The web server process that was being debugged has been terminated by Internet Information Services (IIS).  This can be avoided by configuring Application Pool ping settings in IIS.  See help for further details.

While debugging in Visual Studio 2010, IIS 7.0. I attached to w3wp.exe to debug this one module. During the attach process, I just select Tools -> Attach to Process, no further operation performed on the computer I am debugging – suddenly, I met with the above error.

JUST 1 STEP to fix this:

  1. Open the Administrative Tools window or Open IIS Manager.
  2. In the Internet Information Services (IIS) Manager window, expand the node.
  3. Under the node, right-click Application Pools.
  4. In the Application Pools list, right-click the name of the pool your application runs in, and then click Advanced Settings.
  5. In the Advanced Settings dialog box, locate the Process Model section and chose one of the following actions:
    *.Set Ping Enabled to False.
    —or—
    *.Set Ping Maximum Response Time to a value greater than 90 seconds.

image

Setting Ping Enabled to False stops IIS from checking whether the worker process is still running and keeps the worker process alive until you stop your debugged process. Setting Ping Maximum Response Time to a large value allows IIS to continue monitoring the worker process.

If you have a more elegant solution – please post a comment… I’ll be happy to hear.
...HaPpY CoDiNg

Partha (Aurum)

No comments:

Post a Comment