App cache and ASP.NET application life

Discussion in 'ASP .Net' started by C P, Feb 10, 2004.

  1. C P

    C P Guest

    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
    C P, Feb 10, 2004
    #1
    1. Advertising

  2. 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.

    "C P" <> wrote in message
    news:ex9k$Y#...
    > 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
    >
    >
    Kevin Spencer, Feb 10, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?amlt?=

    Life cycle of ASP .NET Application

    =?Utf-8?B?amlt?=, Jan 18, 2005, in forum: ASP .Net
    Replies:
    6
    Views:
    7,801
    Juan T. Llibre
    Jan 19, 2005
  2. =?Utf-8?B?b25l?=
    Replies:
    1
    Views:
    5,268
    Karl Seguin [MVP]
    Mar 8, 2006
  3. Sergey via DotNetMonster.com

    ASP.NET Cache vs Window System Cache

    Sergey via DotNetMonster.com, Nov 15, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    463
    Sergey via DotNetMonster.com
    Nov 15, 2006
  4. =?Utf-8?B?U2FtZWVrc2hh?=

    HTTP Post and ASP.Net application life cycle

    =?Utf-8?B?U2FtZWVrc2hh?=, Jul 18, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    493
    =?Utf-8?B?TWFuaXNoIEJhZm5h?=
    Jul 18, 2007
  5. DK
    Replies:
    0
    Views:
    735
Loading...

Share This Page