Roger Martin;7638 wrote:If you are seeing a delay on the first page load and subsequent page loads are fast, then I suspect the app pool is still shutting down. There really aren't any other explanations.
One thing that *might* help is configuring
auto-start.
Just to add for the OP, because you are right that there is no other "reason" for the delay but there is more of an explanation. :)
For the OP, this is a known condition with .Net and has been in ASP.Net since 1.0 in 2002. In pretending to be like Java, Microsoft created the idea of an Intermediate Language, or MSIL. When you compile a .Net program, it isn't really compiled to machine code, it is compiled to MSIL. When the application first starts, the MSIL is compiled to machine code. The app pool in IIS, to better share limited resources like memory, shuts down idle applications after the configured time - and you want this; it keeps the running copy cleaned up. But the result of this shut down is that when someone access the site again, after the app pool shut down, then the MSIL is compiled again into machine code on that first access. Once the app is running then successive requests are fact because no more recompiling is required until the app pool shuts down again.
So, Roger is correct, it is the app pool. But now you know why the app pool resetting causes the delay.
Hope this helps.
Dale