App cache and ASP.NET application life

C

C P

I am trying to design a custom ASP.NET control. Its content will be
data-driven, and its content will be a small subset of probably 3-4MB of
data. (I'm examining options for storing this read-only content data - XML,
Access etc). It seems I should use the application cache to store this
3-4MB of data so that every page request doesn't have to re-load the whole
3-4 MB of data. This data will likely only change once every few months.
My problem is that I am unsure of how long an ASP.NET application persists.
I had thought that an ASP.NET app was only 'alive' while a user was
requesting a particular page. After the page has been delivered, then the
app stops. Now other stuff I've read implies this isn't correct, but I'm
not clear on what causes the termination of an ASP.NET app. I know the app
starts the first time a page is requested from my app, but when does it end?
Is it when no page requests have been made for X minutes, or if the server
needs to reclaim some resources, or is it something else?

Thanks,
Chris
 
K

Kevin Spencer

Hi Chris,

The ASP.Net Application will shut down after an interval of time with no
requests. However, if you put the code that loads the data into the
Application Cache into the Application_OnStart Event Handler, and make sure
that you set the cached data to have no expiration, any time the app goes
down, the next request will restart the app and the data will be there (by
virtue of the Application_OnStart.Event Handler).

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 

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

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top