IIS Site Slow to Load on First Visit/Load (SiteFinity)

I had to deploy a new website that was done by a web design company, it was created in Sitefinity. I didn’t have the option to install it, I simply was given the site files and the database. I think had to figure out a way to update the database configuration file, of which Sitefinity doesn’t really have much documentation on. I will post if I find anything related on how to update the Sitefinity database connection strings in the Sitefinity configuration file.

I was able to get Sitefinity working, and the content was displaying properly. However after a little while the site would begin to load slowly, but only on the first page load. I could tell it had something to do with the idle timeout for the application pool in IIS 7.5

Digging further I found the following article that talks about auto start for ASP.NET applications.

http://weblogs.asp.net/scottgu/archive/2009/09/15/auto-start-asp-net-applications-vs-2010-and-net-4-0-series.aspx

I also find this article about Sitefinity and auto start but not much information on how to implement it properly.

http://patrickdunn.me/blog/posts/2012/10/18/auto-start-sitefinity-iis

I then found the following two articles.

http://scottrozman.net/blog/12-07-27/Sitefinity_5_x_Performance.aspx
http://www.techbubbles.com/aspnet/auto-start-web-applications-in-aspnet-40/

The last article from techbubbles.com talks about the preloadEnabled=”true” and preloadProvider=”PrewarmMyCache” of which just cause IIS 7.5 not to start. Because its not valid XML. The error was

The worker process for application pool 'site' encountered an error 'Configuration file is not well-formed XML ' trying to read global module configuration data from file '\\?\C:\inetpub\temp\apppools\site\site.config', line number '3'. Worker process startup aborted.

I later found out this is because preloadEnabled is actually is a property for the “Application Initalization” module.

http://www.iis.net/downloads/microsoft/application-initialization

This property is available by default in IIS 8.0, hence why you might see some documentation talking about it but no the “Application Initalization” module.

So, if you want to be able to use the preloadEnabled property you will need to install the “Application Initalization” module. Just a note on the installation, you will need the x64 binary which is available under “Additional Downloads” at the bottom of the page. You will also be asked to reboot, so if this is a production server, schedule a maintenance.

The following page will go over how to use the Application Initialization Module.

http://blogs.iis.net/wadeh/archive/2012/05/01/application-initialization-part-2.aspx

That’s it!


Did you like this article?


0 Shares:
You May Also Like

Creators Of Mobile Chat For the iPhone Twenty08 Hires AplloIM Developer

If you bought the iPhone when it first came out, you had two choices for Instant Messaging. Twenty08's MobileChat and Alex Schaefer's ApolloIM. Twenty08 has now hired Alex Schaefer to work exclusively on MobileChat
twenty08 would like to formally welcome aboard…Alex Schaefer. Many of you may know him as the founder of the world’s first Native iPhone IM Application, ApolloIM. ApolloIM was an amazing application and during it’s run, MobileChat and Apollo stood head to head and constantly battled to create the better app. (Friendly war of course!) The best part about it was that no one won! Only our respective users benefited from the friendly competition, and you can’t ask for anything better than that as far as I’m concerned. Now with Alex working on our side, we believe that MobileChat will be able to rise up and regain its glory as the number one iPhone application that we all know it can be. He is a very talented developer (plus a great guy) who has already brought some great ideas to the table and we’re all very excited to see our new-found relationship grow.
Read the full article on Twenty08's site. MobileChat's website
Read More