Showing posts with label The web server process that was being debugged has been terminated by Internet Information Services (IIS); This can be avoided by configuring Application Pool ping settings in IIS;. Show all posts
Showing posts with label The web server process that was being debugged has been terminated by Internet Information Services (IIS); This can be avoided by configuring Application Pool ping settings in IIS;. Show all posts

06 April, 2014

Error: "The web server process that was being debugged has been terminated by Internet Information Services (IIS)

Scenario : You are debugging the code in Visual studio. You will be setting breakpoints and then you will be iterating through each line of the code for checking values for each variables, logic's etc in debug mode.

But after 1 or 2 mines passed, you might receive the below error and it will terminate your debugging process .


Error Message: The web server process that was being debugged has been terminated by IIS. this can be avoided by configuring application pool setting in IIS. see help for further details.

Reason for this Interruption: 
In IIS ,there is a settings called "ping period"  and "the maximum response time" which are set to 30 & 90 seconds respectively for each app pools. IIS  performs health monitoring pings against each of its worker processes to ensure they are still responding. If IIS does not receive a response from the worker process to one of these pings within a given timeframe, IIS forcefully terminates the worker process.When debugging in Visual Studio, the worker process is stopped while Visual Studio is paused on a breakpoint. Therefore, the worker process has no way to respond to a health monitoring ping after that given time frame. Therefore, the worker process gets terminated.

Resolution:
In IIS ,You can either set "Ping Enabled" to "false" or you can increase the "Ping Period" & "Ping Maximum response time" to stop getting this error.
Below are the steps to achieve this.
1.Go to Run->inetmgr. It will open IIS Manager
2.Go to the "Application Pools" and select your site's app pool.
3.In the right pane click Advanced Settings.
4.Under "Process Model" , Set "Ping Enabled" to "false" or  increase the "Ping Period" & "Ping Maximum response time".



Note: This is recommended only in development environment.

This will allow you to debug your code without any interruption.

Product applies to:
- SharePoint 2013
- SharePoint 2013