ASP.NET application on IIS7 - very slow startup after iisreset

frankadelic picture frankadelic · Sep 18, 2009 · Viewed 28.1k times · Source

I have an ASP.NET 3.5 website running under IIS7 on Windows 2008.

When I restart IIS (iisreset), then hit a page, the initial startup is really slow.

I see the following activity in Process Explorer:

  • w3wp.exe spawns, but shows 0% CPU activity for about 60 seconds
  • Finally, w3wp.exe goes to 50% CPU for about 5 seconds and then the page loads.

I don't see any other processes using CPU during this time either. It basically just hangs.

What's going on during all that time? How can I track down what is taking all this time?

Answer

Sebastian Good picture Sebastian Good · Dec 31, 2009

We had a similar problem and it turned out to be Windows timing out checking for the revocation of signing certificates. Check to see if your server is trying to call out somewhere (e.g. crl.microsoft.com). Perhaps you have a proxy setting incorrect? Or a firewall in the way? We ultimately determined we had enough control over the server and did not want to 'call home', so we simply disabled the check. You can do this with .NET 2.0 SP1 and later by adding the following to the machine.config.

<runtime> <generatePublisherEvidence enabled="false"/> </runtime>

I am not sure if you can just put this in your app.config/web.config.