keeping asp.net pages warm

L

laimis

Hello,

has anyone succesfully used an approach that I read somewhere suggesting
that after deploying asp.net application, one can create a windows
service or scheduled task that requests for asp.net page from that
application so that it is compiled at all times? This is to avoid long
waiting time when the user hits the site for the first time.

I am about to write a small util that accomplishes the task. I was just
wondering how effective it can be in the production environment...
 
B

Brock Allen

Much of the wait time you experience is not the first-time compilation, but
the AppDomain being loaded. You can keep the AppDomain loaded in the same
manner as you suggest, but the tendancy is to unload the AppDomain if it's
not being used; you may have other apps running on the server that might
like those resources. The behavior of shutting down the Application if it's
not being used is more common in Windows 2003 where (by default) if the app
is idle for 20 minutes it's shutdown. This can be configured in the AppPool
settings in IIS under W2K3.
 
L

laimis

Interesting ...

I got the idea from reading the following article:
http://www.aspnetresources.com/articles/debug_code_in_production.aspx

which has one of the last sections titled "Keep The Code Warm". I
thought, as the author and the white paper suggests, the utility might
be useful. I guess not. Basically what you are saying there is more to
gain by allowing the resources to be freed, than to make sure that the
application stays alive. I guess it depends if any other sites are
hosted and services running.

Well, in any case, thanks for reminding that the delay is also due to
loading the assemblies into app domain.
 
B

Brock Allen

Basically what you are saying there is more to
gain by allowing the resources to be freed, than to make sure that the
application stays alive. I guess it depends if any other sites are
hosted and services running.

Bingo -- as always, it depends :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top