Branislav Abadjimarinov's technical blog - Browsing IIS
I had a strange problem debugging asp.net websites hosted on IIS 7. I attached the Visual Studio debugger to the working process of the IIS (in my case w3wp.exe) and started debugging. After a couple of minutes I got disconnected. This behavior reproduced every time.
After checking the IIS 7 Application pool settings I found out that this is an intended behavior. The IIS pings the working process in a configured time intervals (2 minutes by default) and if the process is hanging (not responding) it restarts the process. When you attach a debugger to the process and you stop at a breakpoint for more than 2 minutes the process will not respond to the ping and it will be killed in the middle of your debugging session. To prevent this simply disable ping in IIS Application Pool settings or extend the ping time intervals.If you do this in development environment don't forget to switch it to true on production servers, because it may be a security issue.
To switch it off:
1. Open the IIS Manager (Run->inetmgr).
2. Go to the "Application Pools" and select your site's pool.
3.In the right pane click Advanced Settings.
4.Find "Ping Enabled" in the list of settings and choose "False" for its valuePosted by Branislav Abadjimarinov on November 12 at 6:36 AM