Eliminate startup delay by suspending the app pool and using Application Initialization
[2015-10-19] This post was updated to describe changes present in IIS 8.5 (Windows Server 2012 R2): the addition of the Idle Worker Process Page-Out feature and the removal of the Start Automatically setting. It is well known that ASP.NET applications have a startup delay after they’ve been idle for a while. Every once in a while someone posts in the forum that the gallery is slow to load at first and then is quite fast. That’s because IIS is doing a lot of stuff when that first HTTP request comes in: Spins up an application pool JIT-compiles the code Performs view generation of the EF model Loads HTTP modules Runs initialization code in GSP, which connects to the database and loads application settings and other lookup data. All that takes a few seconds, which isn’t terrible, but first impressions are important. Wouldn’t it be better if IIS handled this before [...]