Search code examples
asp.netshared-hostingwarm-up

Keeping ASP.NET4.0 page warm on shared hosting


I have a (yet) rarely visited page deployed on a shared hosting environment. Currently, I get very low number of visitors, like 1 visitor/day.

It looks like that IIS 7.0 "drops" my site after being idle too long. The first pageload after this takes 30 seconds or more. Due to the rare visits, actually all my visitors pay for the site-startup. (After reviving the site, the page load normalizes to 1-3 seconds.)

I know about Application Warm-Up features of ASP.NET4.0 and IIS7.5, but due to the given shared hosting environment, I have no way to utilize them.

How can I keep my site artificially alive?


Solution

  • Fire up a timer in your Global.asax and make it poke itself by "visiting" several pages via simple WebRequest.