Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The easiest way I know of to keep your site alive is to make sure traffic is always coming through. If you have access to a scheduled job runner, have it ping a dummy aspx page every minute or two - this way, your app should run indefinitely.</p> <p>If not, there are techniques to cheat the system. You can have a cache item built, and upon expiration of that cache item, create another cache item. This will perpetually keep running code every X minutes, which will keep the app alive. The problem with this is that if the app ever does die (server reboot, IIS restart, etc.), the app will be dead until someone makes a real request, at which point it will stay alive indefinitely again.</p> <p>This technique is sometimes used to simulate a task scheduler in ASP.NET. Just keep in mind that it's not perfect.</p> <p><strong>EDIT</strong>: For clarification, you wouldn't just create a new cache item, you'd actually make a request to a page which would then in turn create the cache item. This ensures that another request is made through IIS, which in turn runs the full lifecycle, keeping the app alive.</p> <p>Even if you do set your session timeout high, there's no guarantee that it will hold. I've dealt with hosting companies who will recycle your application pool after just a couple minutes of inactivity, killing any sessions you may have open. They don't care that you may have sessions open - they are just trying to squeeze every CPU cycle they can out of their servers. So if you're on shared hosting, you may want to keep that in mind - you may not be able to control how often they kill your app.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload