Hang in IIS 7.0
Published Feb 15 2019 05:05 PM 1,057 Views

When hosting an web application on IIS7, and you have the application running in integrated pipeline mode, you may find that users complain that the application performs slowly.  This may occur if your website is busy, handling 12 or more requests concurrently, and those requests are handled asynchronously as opposed to synchronously.  The same application may appear to not suffer from poor performance when hosted on an IIS 6.0 server, or if the IIS7 site is set to run in Classic mode. 


If you were to look at the currently executing requests in the IIS Manager by using the Request Monitor feature, you may see 12 requests currently in the ExecuteRequestHandler state, and all of the other requests waiting in the BeginRequest state:


The behaviour occurs because beginning in IIS7, when an application runs in Integrated mode there is a restriction on the number of concurrently executing requests per CPU.  By default, the limit to the number of concurrently executing requests is 12.  You can modify this limit by setting the MaxConcurrentRequestsPerCPU registry key at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ASP.NET\2.0.50727 to a value higher than 12.  NOTE: By default, this registry key does not exist.  You will need to create it manually as a DWORD and give it a value.  The value you should give it depends on your application load and how many concurrent requests are expected. 


For a more detailed explanation of how threading works in IIS6 and IIS7, please see:


ASP.NET Thread Usage on IIS 7.0 and 6.0




Contention, poor performance, and deadlocks when you make Web service requests from ASP.NET applications

Author: Mike Laing

Version history
Last update:
‎Feb 15 2019 05:05 PM
Updated by: