What is the lifetime of an Application state?

Discussion in 'ASP .Net' started by Bruce W.1, Jan 29, 2004.

  1. Bruce W.1

    Bruce W.1 Guest

    I'm storing some things in the application state, like this:
    Application["MyValue"] = "whatever";

    In Visual Studio, when I shut down the web app then start it again the
    application state information remains. If there are no browsers using
    the app one would think that this would remove any application state,
    but it does not.

    However if I wait awhile then the application state information goes
    away.

    What controls the length of its life?

    Thanks for your help.
     
    Bruce W.1, Jan 29, 2004
    #1
    1. Advertising

  2. The behavior you are seeing is somewhat skewed by the debugger. Its altered
    to mimic the real world behavior as much as possible. An application is
    recycled when, among other things, files are touched in the directory.
    Closing visual studio does not touch the files so the application state
    remains. However if you save before closing that will trigger a restart of
    the app. This closely mimics real world behavior which cause an app to
    restart if the config files are dirty, the number of uploaded files exceed
    15, the assembly files change, idle time out etc etc.
    Makes sense?

    --
    Regards,
    Alvin Bruney [ASP.NET MVP]
    Got tidbits? Get it here...
    http://tinyurl.com/3he3b
    "Bruce W.1" <> wrote in message
    news:...
    > I'm storing some things in the application state, like this:
    > Application["MyValue"] = "whatever";
    >
    > In Visual Studio, when I shut down the web app then start it again the
    > application state information remains. If there are no browsers using
    > the app one would think that this would remove any application state,
    > but it does not.
    >
    > However if I wait awhile then the application state information goes
    > away.
    >
    > What controls the length of its life?
    >
    > Thanks for your help.
     
    Alvin Bruney [MVP], Jan 29, 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?RXJpYyBNY1ZpY2tlcg==?=

    Why can't Application state be managed like Session state?

    =?Utf-8?B?RXJpYyBNY1ZpY2tlcg==?=, Nov 7, 2005, in forum: ASP .Net
    Replies:
    6
    Views:
    1,555
    Steven Cheng[MSFT]
    Nov 10, 2005
  2. Replies:
    6
    Views:
    486
    John Timney \( MVP \)
    Nov 30, 2005
  3. Sashko
    Replies:
    1
    Views:
    768
    Joerg Jooss
    Jun 22, 2006
  4. Chris
    Replies:
    1
    Views:
    399
    Nick Gilbert
    Jun 4, 2010
  5. Paolo Pagano

    Application object lifetime

    Paolo Pagano, Jul 22, 2003, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    133
    Paolo Pagano
    Jul 22, 2003
Loading...

Share This Page