问题
When I browse my website first time, internet keeps spinning/loading. If I two seconds later try to load it again, everything works fine.
It's like it's "sleeping".
I think it must have something to do with "recycling". I have set "Idle time-out" to 0 and Recycling "Regular time interval" to 0.
Before I browse my website, I take a look at "Worker process" and it says that the app pool process is running.
Any idea why my website "falls asleep"?
Thanks! Mojo
回答1:
Your ASP.NET pages are compiled the first time they are requested (see "Understanding ASP.NET Dynamic Compilation"). So this might be the issue why your first request takes so long.
To avoid that, you can precompile your ASP.NET application:
- How to: Precompile ASP.NET Web Site Projects
来源:https://stackoverflow.com/questions/5050025/iis-7-5-initial-request-to-website-never-gets-loaded