views:

1395

answers:

4

When I am debugging on my Windows 7 IIS7 machine, I get this error during a debug:

The web server process that was being debugged has been terminated by IIS. this can be avoided by configuring application pool setting in IIS. see help for further details.

What am I doing wrong?

+2  A: 

http://weblogs.asp.net/soever/archive/2009/06/18/debugging-sharepoint-asp-net-code-smart-key-codes-disable-timeout.aspx

Your App Pool -> Advanced Settings -> Ping Enabled to False

Paul Betts
+2  A: 

IIS has a health-checking feature which periodically checks to see if an IIS worker process is hung or otherwise unusuable. If a worker process is stopped in the debugger, it looks unhealthy from the perspective of IIS, and IIS kills it and spins up a new process.

To change this behavior (on your dev workstation-- don't want to disable this in production!) go to the IIS management tool, select the Application Pools node in the left pane, and right-click on the app pool that your app lives in, and choose "Advanced Settings". From there, in the "process model" section, set "Ping Enabled" to False. You may also want to set the idle timeout to be a very large number.

See this IIS.NET article for more discussion of this issue and a screenshot. See this TechNet article for how to set these settings via code/script outside the admin tool.

Justin Grant
+19  A: 
Portman
Why wouldn't you just use the setting right above it to disable ping altogether?
Paul Betts
@Paul Betts: because you want to mirror production as closely as possible. Disabling ping altogether is a bit Draconian when all you really need is to increase the ping interval.
Portman
A: 

If you have microsoft's scom running and configured where you work (assuming this is not a for-fun project) and you are able to create a management pack for it or know someone who is, that may help you pinpoint what is causing the issue. I realize its a long shot, but if that does describe your scenario that is what I would do if no other solution is found.

tb