Stop site unloading

  • Thread starter Thread starter Mark B
  • Start date Start date
M

Mark B

We have had an issue with out asp.net site unloading when it wasn't being
hit. Then later when a person goes to it, they have to wait 30 seconds while
it 'compiles'.

Our ISP pointed us to the site's Control Panel where a scheduled web event
can be created. We did so and put www.oursite.com/pages/home/default.aspx as
the page to load.

It didn't work because the webhost said it was too large or something. So
they created the following KeepAlive.aspx page for us:
 
Mark B said:
We have had an issue with out asp.net site unloading when it wasn't being
hit. Then later when a person goes to it, they have to wait 30 seconds
while it 'compiles'.

Our ISP pointed us to the site's Control Panel where a scheduled web event
can be created. We did so and put www.oursite.com/pages/home/default.aspx
as the page to load.

It didn't work because the webhost said it was too large or something. So
they created the following KeepAlive.aspx page for us:

-----------------------------------------------------------------
<head runat="server" />

Site is working!

-----------------------------------------------------------------

I am wondering though whether such a page actually causes ASP.Net to
compile though? Looks to simple? It still takes ages when the site hasn't
been hit for a while.

Rather than use hacks, you can pre-compile your site to native code using
the NGEN.exe tool. This means that regardless of how often the server
recycles, the next user won't get hit with a JIT compile delay.

http://msdn.microsoft.com/en-us/library/6t9t5wcf(VS.80).aspx

-Scott
 
Back
Top