When we are debugging any web application hosted in our local IIS using visual studio, we attach the worker process (
and start debugging. It works fine when we are continuously doing step
into (F11) and step over(F10) actions to debug the code.But i am sure
that every developer has faced the situation when he/she is debugging
the code for a long time and in some cases he/she is idle or not doing
any step in or step over action and getting the error message from
visual studio saying :
debugger stopped execution of code on the Web site. This caused
Internet Information Services (IIS) to assume that the worker process
stopped responding. Therefore, IIS terminated the worker process."
then we press "ok"
and immediately visual studio stops debugging process. In that case, to
debug the application again we need to start the debugging process from
the beginning. This kills significant amount of development time and
Why we get this error message?
IIS monitors the worker process by sending a periodic ping request. If
the worker process does not respond in a timely manner, IIS terminates
the process after a specific number of ping. Default timeout is 90 second and that why we get this error message.
Configuring the application pool in IIS, we can easily fix this
problem and can debug easily. There are two configurable way to
1. Setting the ping enable to false
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.
2. Increasing the ping maximum response time
Setting Ping Maximum Response Time to a large value allows IIS to continue monitoring the worker process.
To do these follow the steps:
- Open IIS Manager .
- Click Application Pools.
3. In the Application Pools list, right-click the name of the pool your application runs in, and then click Advanced Settings.
4.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
5. Click "Ok" to close the Advanced Settings dialog box.
6. Close IIS Manager.
Enjoy the ultimate debugging.