Click here to Skip to main content
Click here to Skip to main content

How to increase debugging idle time in Visual Studio configuring IIS

By , 11 Mar 2012
Rate this:
Please Sign up or sign in to vote.

Background

When we are debugging any web application hosted in our local IIS using visual studio, we attach the worker process (w3wp.exe) 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 :

"The 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 effort. 

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.

Solutions

Configuring the application pool in IIS, we can easily fix this problem and can debug easily. There are two configurable way to solve this:

1. Setting the ping enable to false

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.

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:

  1. Open IIS Manager . 
  2. 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. 

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

SERokon
Software Developer (Senior) The Jaxara IT Ltd.
Bangladesh Bangladesh
Working as Sr. Software Engineer and developing web application
Using ASP.net (C#) and MS SQL server for last 6 years.

Comments and Discussions

 
GeneralMy vote of 5 PinmemberCREart21-Jan-13 22:46 
Questionmy vote of 5 Pinmemberbeginner201131-May-12 21:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web03 | 2.8.140415.2 | Last Updated 11 Mar 2012
Article Copyright 2012 by SERokon
Everything else Copyright © CodeProject, 1999-2014
Terms of Use
Layout: fixed | fluid