The content you're reading is getting on in years
This post is on the older side and its content may be out of date.
Be sure to visit our blogs homepage for our latest news, updates and information.
A question I’ve received multiple times is “Why is it taking so long to load Sitefinity the first time after I recycle my application pool/restart my server/make change in my web.config file, etc"?
The answer is simple – it’s how .NET works!
Sitefinity is an ASP.NET web application. As such, the first time a user requests a resource from the website ASP.NET automatically compiles the application code and any dependent resources. Furthermore any application pool recycles, modifications in the source code or the top-level items of the application (such as the web.config, global.asax, etc) would cause ASP.NET to recompile the source files into assemblies. More info about ASP.NET’s application lifecycle can be found on MSDN.
So is there a way after a scheduled application pool recycle or change in the code for avoiding the first user to have to wait until the application recompiles? The answer is – yes, there is! It’s called application warm-up. It’s all about forcing the application to reinitialize after it has been restarted. It’s not something you do from within Sitefinity, just as recompilation doesn’t happen because of Sitefinity.
There are a couple of handy tools that work like a charm to achieve the required results:
1) Application Initialization for IIS 7.5 - IIS Application Initialization for IIS 7.5 enables website administrators to improve the responsiveness of their Web sites by loading the Web applications before the first request arrives.
Well, after giving it a try, it does do what it says on the tin! After installing it on your server, you can either configure forcing individual applications to reinitialize after an application pool recycle/server restart, or configure the applications to reinitialize after a soft reset (edits in web.config, etc).
In order to set up application warm-up after a recycle, you need to edit your %windir%\system32\inetsrv\config\applicationHost.config file and locate your <system.applicationHost> block. Edit the settings of the application you’d like to automatically initialize after a restart like this:
" MyApplicationPoolName "
2) Keep Alive Service For IIS 6.0/7.5 – the keep alive service requires no configuration, i.e. you install and forget about it. It monitors your IIS metabase and keeps all websites warm and quick.
So far I’ve been experimenting with these two and they seem to work pretty well.
Feel free to add your own tips, tricks and suggestions to the list!
View all posts from The Progress Team on the Progress blog. Connect with us about all things application development and deployment, data integration and digital business.
Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.
Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.