I have set up App Initialization on for a large website, however there is still quite a long wait before the website is initialized before users can access it. The site in question is quote big and compilation of the views is the issue.

Is there anyway to 'warm up' a website without any down time to the user. It appears that application initialization does that to an extent, but it would be much better if I deployed the website again that IIS kept running in the current process whilst the app initialization was firing up and then handed over to the new process. Is this what it is supposed to do?

Are there any alternatives to this predicament? We tried pre compiling views using https://github.com/RazorGenerator/RazorGenerator but ran across some issues which nested views.

2 Answers 2


There are a lot of recommended ways to address this, many of which it looks like you've found. Ultimately, with IIS, the best option is to have multiple machines with a load balancer. An administrator or the load balancer configuration can then determine under what conditions each server should be put into use. This solution has the added benefit that you get protection from web server hardware failures, and increased scalability as well. Software load balancer can also be used (such as Microsoft NLB which comes with server editions of Windows), but these may require a bit of programming and an external controller if you want to automatically remove servers during maintenance.

  • Thanks for the reply. With a web farm you face the same issue though - in that you have one central set of files. If these files change then all app pools are restarted are they not? The only solution I have found is to pre-compile all views before deployment. The website kicks back into gear in about 15 seconds when I do this, which is not so bad. Another idea was to have a hot/cold set up. Hot being the live website files, cold being dormant. I would deploy to cold, warm it up and then switch hot to cold and away we go. All these solutions are time consuming, however.
    – izip
    Commented Mar 31, 2015 at 11:46
  • If you have a copy of the files on each server, you can avoid that problem (you can dynamically have hot/cold with any combination of servers). I've also read that there is a new setting in the latest version of IIS that lets you turn off the automatic recycling.
    – James
    Commented Apr 1, 2015 at 1:20

We are doing it in following way:

  1. (Easiest) One server, one application, with Application Initialization. Immediately after deployment wget in spider mode is sent to visit all server pages up to 3rd level from homepage. This does not bring me such an brilliant 15 seconds of outage (normally, site is slow or showing App_offline page up to 3 minutes), but still - after deployment we have good application with all pages in cache.
  2. (better for stability) 2 or more servers behind load balancer (Microsoft NLB is ok, but any other can do). Each server before deployment is switched off LB, then deployment is fired and after it is finished to this particular server - wget in spider mode on server visits all pages and server is back in LB.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .