Visual Studio 2005 on Vista: Timeouts while Debugging Web Applications on IIS
Debugging web applications in windows Vista can be quite a pain if you run into the timeout issue: when you use Visual Studio to debug a web site (or any other web-project) and pause the execution or step through the program, then occasionally the debug session will be terminated unexpectedly.
Fortunately, you can fix that by disabling a certain timeout setting in IIS7. The error occurs not because the network connection time's out, but because the webserver's .NET Application Domain was reset.
This occurs because IIS7 on Vista "pings" worker processes such as w3wp.exe regularly, and terminates them after a period of inactivity. By default, if the ASP.NET hosting process seems hung for 90 seconds, it will automatically be terminated.
That feature is potentially a boon for a server's robustness - but it's problematic during development. You can work around this issue by using Visual Studio's Internal Web Server. That server brings its own troubles with it, since it's an entirely different server and not the best simulation of actual deployment in any case.
A better solution is to disable the "hung process" timeout. To do that you'll need to modify the settings of the IIS application pool your web application is running in.
First, determine which Application Pool your web site is currently in by selecting the "Advanced Settings" of the Application in the IIS Manager. In the screenshot I want to determine the application pool of application "webstatic" on "MySiteToDebug":
As in this screen shot, most applications will be in the DefaultAppPool application pool, which you will need to modify.
To modify DefaultAppPool (or whatever application pool your application runs in), select "Application Pools" from the tree control left, then select your application pool from the list in the middle, and Edit the "Advanced Settings..." by clicking the link on the right.
"Ping Enabled" should be set to false. This affects all web applications using the application pool, so you'll probably only need to do this once per development machine.
By disabling pinging of worker processes, it's possible to debug web applications on IIS7 with VS.NET 2005 without interruptions.
