Solved

losing session and application variables on IIS 6.0

Posted on 2004-09-14
14
6,559 Views
Last Modified: 2009-01-15
A number of websites with database/session based login have recently been moved from IIS5.0 to IIS6.0
Everything works, except that the Session and Application variables are lost every 3-4 minutes. The fact that also the Application variables are lost, means that somehow the application is being restarted ever so often.

Has anyone experiences like this?
Can anyone point me to why this happens and how it can be solved?



0
Comment
Question by:sybe
  • 3
  • 3
  • 3
  • +4
14 Comments
 
LVL 21

Accepted Solution

by:
ap_sajith earned 100 total points
ID: 12052526
>>Has anyone experiences like this?<<

No, I havent come across such an issue yet. However, it would be helpful if you posted the code that sets the application variable.

Also, did you check the Event logs for anything that could be causing the restarts.

Cheers!!
0
 
LVL 21

Expert Comment

by:ap_sajith
ID: 12052553
Another thing that just came to my mind... Maybe the Virus scanner is messing around with the asp pages. Try running your code after disabling the virus scanners. Or, make sure that .asa and .asp files are excluded from realtime filesystem protection feature.

Cheers!!
0
 
LVL 28

Author Comment

by:sybe
ID: 12052621
the problem is that it's on a remote server i can not control.

There wasn't any global.asa before, but i noticed that session variables kept disappearing after 3 minutes (not very user friendly if you want to update your data). I put in a global.asa just to check what was happening: does the website only lose Sessionvariables, or also Applicationvariables. It is losing both every three minutes.

All sites on this server were recently moved to a new server. They were working without problems on the old server.

global.asa is this:

<%
Sub Application_OnStart()
    Application("starttime") = Now()
    Application("starttimer") = Timer
    Application("test") = 1
End Sub

Sub Session_OnStart()
    Session("starttime") = Now()
    Session("starttimer") = Timer
    Session("test") = 1
End Sub
%>

The virus-scanner isn't a very bad idea, i'll check that. As far as my knowledge goes only editing the global.asa will restart the application, am I right?
0
 
LVL 31

Assisted Solution

by:alorentz
alorentz earned 100 total points
ID: 12053099
>>the problem is that it's on a remote server i can not control.

That's probably it, they are doing something.  Who is controlling the server...?

I know you are quite familiar with coding, so this is most likely not a coding issue.
0
 

Assisted Solution

by:BigTone
BigTone earned 100 total points
ID: 12053104
Restarting IIS, stopping/starting a website within IIS or causing the global.asa file to change will cause the Application/Session objects to be repopulated.

As well as that, if you call Session.Abandon, that will end the Session prematurely. If all Sessions end within an application, the application's ON_END block calls, and wipes the App out too.

It's also possible that another site on your host's server - in your application pool on Windows Server 2003 or on your server in Windows Server 2000 - could be causing IIS to restart itself. If that's what's happening, there's very little you can do short of creating new ways of storing your session/application state elsewhere (such as a local MSDE database, text files etc...)
0
 
LVL 6

Assisted Solution

by:masirof
masirof earned 100 total points
ID: 12053613
Can you ask them to restart server?
0
 
LVL 11

Assisted Solution

by:Slimshaneey
Slimshaneey earned 100 total points
ID: 12054052
I believe there is a feature of IIS6 that restarts the Application or IIS every time a major fault happens, or every 5,000 page hits. It should persist the data, but maybe that is not happening. I could be talking utter rubbish, wouldnt be the first time, but I do remember reading something along those lines...
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 28

Author Comment

by:sybe
ID: 12054099
I have been suggesting the virus-scanner top the admins of the site(s). Waiting for them to answer now. They are somewhere at the other side of the globe, so i don't know how long it will take for them to answer.

Anyway, thanks for the suggestions so far. And if you have any more ideas: let it come. It's quite nasty that our customers have to login every 3 minutes.
0
 
LVL 31

Expert Comment

by:alorentz
ID: 12054158
There are a number of things in IIS6 that will cause IIS to restart....quite stupid actually for just this reason!

http://www.microsoft.com/resources/documentation/IIS/6/all/techref/en-us/iisRG_ADM_20.mspx
0
 
LVL 31

Expert Comment

by:alorentz
ID: 12054169
www.1and1.com seems to be pretty good so far....
0
 
LVL 11

Expert Comment

by:Slimshaneey
ID: 12054266
Sybe, you prolly already seen this. Most av scanners allow you to skip directories dont they?

http://support.microsoft.com/default.aspx?scid=kb;en-us;316148
0
 
LVL 21

Expert Comment

by:ap_sajith
ID: 12061508
0
 
LVL 28

Author Comment

by:sybe
ID: 12066917
The admins said:

"A worker process with process id of 'xxxx' serving application pool 'domain.com' has requested a recycle because it reached its virtual memory limit. "

In don't know, but the problem seems solved now.
Thanks everyone for their input and ideas. I'll give everyone points who went through the trouble of answering.
0
 
LVL 15

Expert Comment

by:joeposter649
ID: 13097824
Perhaps it's anti-virus software...
http://support.microsoft.com/default.aspx?kbid=303881

They should be able to check their logs to see if the application is restarting.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now