green field

Using The AppKeepAlive Task To Speed Up a Low Traffic Site

ASP.NET sites generally suffer from slow performance when the application is just starting to get requests, after a few requests for various pages, the JIT (Just In Time) compiling is all done and it serves requests much faster. The problem is if you don't get much traffic the application shuts down (after 20 minutes of no  requests) then when you finally get a visitor again it has to do all that JIT compiling again so the few visitors you do get all get the slow site experience. A site that gets consistent traffic generally performs much better.

If you look for this in the Web.config:

<add key="UseAppKeepAlive" value="false" />
<add key="AppKeepAliveUrl" value="" /> 

If you set UseAppKeepAlive to true, a background thread will be spawned that makes a request to the site often enough to keep the application pool from shutting down the application due to low traffic.

Ideally you will add this to user.config instead of Web.config so that you do not lose this setting during upgrades.

If using IIS 7 with Integrated Pipeline mode then you must specify the url to the root of your site in AppKeepAliveUrl like http://yoursiteroot/Default.aspx

Keep in mind that once your site starts getting consistent traffic, it is better to disable this.

Custom Skinning by Joe Davis Your advertisement here xSQL Software SQL Tools
A better event calendar for mojoPortal