ASP.NET Debugging Timing out with IIS

Rather than changing your app pool settings in IIS, you should temporarily change the httpRuntime executionTimeout attribute in the web.config. The default is 110 seconds, which is usually plenty of time, but not if you are debugging. Increasing the timeout will allow requests to the server to run for longer.

<system.web>
   <httpRuntime executionTimeout="360" />
</system.web>

That sets it to 6 minutes (360 seconds).

After you are done debugging you can remove the attribute and IIS will go back to the default.


Note that if you are using a ScriptManager (for say, update panels), it uses it's own timeout set by:

<asp:ScriptManager ID="ScriptManager1" AsyncPostBackTimeout="???" ...
</asp:ScriptManager>

I recommend that you set it to a high value only when in debugging. You can do this in the pageload event of the page where the scriptmanager control exists:

If Debugger.IsAttached Then
    ScriptManager1.AsyncPostBackTimeout = 600
End If

Setting the connection limit works if you set it high enough. I wanted to never be bothered by this again. Here is what I did:

This assumes you've got an IIS App Pool selected in the IIS Manager

...In the Advanced Settings dialog box, locate the Process Model section, and perform one of the following actions:

  1. Set Ping Enabled to False.
  2. Set Ping Maximum Response Time to a value that is larger than 90 seconds.

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.