ASP.NET Debugging Timing out with IIS
Finally broke down and seeking help, my client/iis (not sure which) usually times out after about 30s - 1 minute while im debugging (stepping through code) which not only causes me to lose my spot and have to start over (usually stepping faster, making more mistakes) but the IIS Debug session closes completely and I have to warm up the entire session again.
开发者_C百科What's the best way to get more time out of a debugging session?
Debugging a vanilla 3.5 Web Site (not app) on IIS 7.5 Classic Pipeline
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:
- Set Ping Enabled to False.
- 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.
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
精彩评论