That may not 100% related to your problem but it's worth to have a lot
http://www.experts-exchang
Main Topics
Browse All TopicsI use Application and session variable in my web application, with W2K, IIS5, SP2.
Application, and session variable would disappear after the IIS running a few (3) days. (The value the variable is empty)
Application varible and session variable may disappear in different time.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
That may not 100% related to your problem but it's worth to have a lot
http://www.experts-exchang
More Infomation about my probLEM:
Application Variable: I did put the variable in Application_OnStart sub in global.asa, However, it still disappear from time to time.
Session Variable: I set a session timeout to 600 minutes. Wire thing is: Your session variable may loss even you are using the application continously. (Keep send back and forth to server)
I know some other company also have same problem, Any one knows more information?
Setting a large timeout value on the session doesn't make it more stable. On the contrary, the memory will fill up with session objects waiting to time out. When the memory fills up, the server may "panic" and start throwing sessions away to free resources.
If you set the application variables in global.asa, the only way (AFAIK) they may disappear is if you remove them somewhere in the code. An application will never run without an application object. If the application gets terminated, a new application object will be created as soon as someone browses to the application, and the variables will be set in globa.asa for the new object.
Greetings,
One of the ways to have the server clog up memory and start panicing, as GreenGhost puts it, is using MS Access as a web database.
Normal applications aren't used all the time, so Access gets a change to shut down and release resources. There are some applications which need to run 24/7. Access doesn't like that. Solution: don't use Access when the site needs to be used continuously.
Imagine!
This question appears to have been abandoned. Please come back to this question and do the necessary evaluation or feedback. I will invite a Moderator to close this question if there's no reply from you after seven days.
I suggest
<points to GreenGhost>
** PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER **
hongjun
Just ran into exactly the same problem. IIS is running on my local box:
Win XP Service Pack1, 2.2GHz, 1GB RAM, IIS 5
Once in a while all Application variables disappear (just become blank).
Looks like it happens on computer start-up also. Random playing with
killing DLLHOST, restarting IIS, and Deleting/Recreating web app eventually
fixes it (didn't quite figure the right order yet).
All application variables are defined in Application_OnStart in global.asa
and are never changed. It almost looks like OnStart event never fires!
I am running regular ASP 3.0 pages.
This box is my development machine. It is NOT running out of resources.
The only thing that is different on it from other "normal" development boxes
is that it has Visual Studio 6.0 AND Visual Studio .NET installed together,
with local debugging enabled... yeah, that would be pushing it :)
Any suggestions?
Greetings,
VS6 together with VS.Net shouldn't be a problem. With a big "shouldn't". I've had them both on my W2K machine and suddenly IIS5 didn't run at all. Reinstalling IIS5 didn't work. I had to remove VS.Net, remove the .Net framework, reinstall VS6 and IIS5 before IIS started behaving normally again.
May Win XP be the problem? Was XP meant to function as a web server? I thought the IIS only ran stabily on NT / W2K?
If your application variables vamoush, does that leave a trace in the event logs?
Imagine!
No, don't think XP is a problem. At least it wasn't in my 2 last development shops where every developer had WinXP with IIS5 and VS6. Sure it crashes dev environment 3-4 times a day, but what developer doesn't need a break? :) Enabling debugging on XP, with both VS6 and VS.NET installed WAS though, sort of a challenge. You can only have debugging in one or another, that's as much as I figured.
Back to the subject, as I stand today, IIS in the morning desided to behave and shows Application variables as expected. So it gets hosed at startup at random. No event log errors that I could relate the problem to...except maybe these:
Error: "Automatic certificate enrollment for local system failed to contact the active directory (0x8007054b). The specified domain either does not exist or could not be contacted." (I don't think this autoenrollment ever worked).
Information: "The description for Event ID ( 0 ) in Source ( Machine Debug Manager ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer..."
What will tomorrow bring?
Greetings,
Although this autoenrollment acts on the active directory, this may be a symptom of a remote access problem. Especially when the machine should have been able to enroll into the active directory.
Then, what you'd look for, are problems with the remote access and telephony services.
Doesn't Microsoft have a KB article on your problem? Probably not, otherwise you wouldn't have asked it here. That would mean, they either never tried, or they thought no-one would.
I'd suggest the easy way out. Take a second machine and split up VS6 and VS.Net. If your problem is gone, it's been the combination. If not, there's something else and we've eliminated one possibility.
If all possibilities are eliminated, what remains must undoubtedly be true. Elementary, my dear Watson.
Business Accounts
Answer for Membership
by: GreenGhostPosted on 2002-08-15 at 04:37:20ID: 7222117
If an application is unused for some time (overnight?), the IIS may decide to stop the application to preserve resources. I don't know the exact criteria for this to happen, but I imagine that it depends on the worload on the server.
For this reason, you should always set the application variables in the Application_OnStart sub in global.asa. This way, when the application starts again, the application variables are set up with the correct values.
Session variables disappear when the session ends. This usually happens when the session times out; the default Session.Timeout value is 20 minutes, meaning sessions will end 20 minutes after the last contact with the user. When the application ends, all it's session ends also, of course.