473,471 Members | 1,733 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

What is the lifetime of an Application state?

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.
Nov 18 '05 #1
1 1351
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" <no@direct.email> wrote in message
news:40**************@direct.email...
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.

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: MuZZy | last post by:
Hi, Lately i've been (and still am) fixing some memory leaks problems in the project i just took over when i got this new job. Among the other issues i've noticed that for localy created objects...
6
by: Richard Steele | last post by:
I have a static object that gets referenced at application startup. This object stores a dataset and various strings to be used whenever required. This object may be called at anytime to provide...
11
by: Trapulo | last post by:
I've a question about globa variables lifetime in an asp.net app. I've declared this class: Public Class Utils Private Shared _FcdDataManagement As FCD.DataManagement Public Shared...
16
by: anonymous.user0 | last post by:
The way I understand it, if I have an object Listener that has registered as a listener for some event Event that's produced by an object Emitter, as long as Emitter is still allocated Listener...
2
by: xzzy | last post by:
Using ASP.net, C# and a static class, does the following from MSDN mean: 1. a static hashtable would only live during the session and end when the session ends 2. there would be a different...
0
by: Kürþat | last post by:
Hi all, I want to host a remote object in a windows service. This remote object fires events about service state. Clients connect and consume this events. The service configures and marshal...
3
by: garyusenet | last post by:
In a book i'm reading i've just ventured into chapter 3 - C# language fundamentals. Now i can see that the first part of the code after the class definition defines a public variable, of type...
3
by: Ing. Davide Piras | last post by:
Hi there, in my c# .NET 2.0 application I run few threads (from 6 to 12 it depends...) and then my GUI Thread should wait all of them have finished their task... so after create those threads i...
66
by: John | last post by:
Hi What are the advantages actually achieved of managed code? I am not talking of theory but in reality. Thanks Regards
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.