Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How long is an Application value saved? 4

Status
Not open for further replies.

achmo

Programmer
Aug 30, 2001
56
IL
If I enter a value into an application object, say:

application("counter")=5


will this value be erased when there are no more sessions on the site? Is there a way to define a longer timeout (like the timeout property of the session object)? and if not, is there a way to save a value without loosing it?


Thanks,
Yael
 
ok, but when does the Application stop? Whan the server is restarted? If the server was not restarted, but no-one is on the site, is the value saved?

Thanks,

Yael
 
Yes, if no one is on the site, and the server is still running, your value will be saved until IIS is stopped and restarted.
penny.gif
penny.gif
 
One problem with using the application object to store your variables is that of persistance. If the value must exist for the life of the site, it would be better to store it in a file or db application.

sjuarez1979
 
It is erased from theserver in three cases.
1)Until the server is shut down
2)Global.asa file is latered.
3)the application is unloaded.
New version of ASP included with Windows 2000 contains new method of removing application variables.

Is that OK ?

Rushi@emqube.com
 
I am using an application object as a counter, so it's not a disaster if it is erased, but I rather it wouldn't. In light of what you all said, I've decided to use it, but every 50 times the page loads, the application value is moved to the DB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top