The scenario is this.
You are in IIS Manager for IIS 6.0 and you are changing the ASP.Net version for your application (Application, Properties, the ASP.Net tab, ASP.Net version).
You hit Apply or OK and you get the hourglass and then you wait. The site may also become unavailable until you restart the web server or do an IISReset.
When you check the Application Event logs, you will see this error:
Event Type: Error
Event Source: ASP.NET 2.0.50727.0
Event ID: 1024
Failed while restarting W3SVC. Error code: 0x8007041d
So. What is going on?
Using the err.exe tool (http://www.microsoft.com/en-us/download/details.aspx?id=985 ) gives a hint:
# as an HRESULT: Severity: FAILURE (1), Facility: 0x7, Code 0x41d
# The service did not respond to the start or control request in a timely fashion.
So something did not respond or start in a given amount of time.
In this case the following happens. When you change the ASP.Net version the entire W3SVC process restarts. The timeout for this is 60 seconds.
This also means that the associated application pool must be shut down. And the “Shutdown time limit” is 90 seconds.
This time is given so that, for example, connections to databases can be closed, resources to be freed etc.
So in a case where the application pool have not stopped within the given time (90 seconds by default) we will hit the W3SVC timeout limit (60 seconds by default) and
we will get the behavior and message in the application event logs.
The recommendation would be to not change ASP.Net version on production machines except during maintenance or when the usage is low so that the application pool
can be stopped within the given time. Or you could reduce the time given to the Application pool to shut down (i.e. less than the 60 second W3SVC timeout limit).
Now, why the application pool takes so long to stop is a different story J
There could be many reasons why it can’t shut down in time. One is described in Tess blog below. But to get the individual cause the specific application pool must be investigated.
ASP.NET tab forces restart of W3SVC
ASP.NET hang/slowness on startup