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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Do Session Variables Loose Value on Timeout?

Status
Not open for further replies.

RoadRacer

Programmer
Dec 18, 2000
61
US
Ok, maybe this isn't the best subject to describe what I'm finding so let me explain a bit better.

I'm maintaining a "Users Online" list in an App Variable. As users leave through a LOGOUT page that I have, they are removed successfully from the online list. BUT, if they simply leave the site and without logging out via the logout page, they stay on the list forever and a day. =)

Funny thing is, the way they are removed from the list with the logout page is by executing a session.abandon which executes the On Session_End in my global.asa ... which is what I thought was executed on timeout as well. I'm wondering if that by the time the Session_End is executed on timeout are the session variable already cleared of their values. If that's the case, it would make sense for the name not to be 'found' in the online list since the name is blank. Otherwise, I have no clue.

Any help would be greatly appreciated ... THANKS!
 
As well as executing what is in your Session_End event, all session variables associated with that session are destroyed along with all objects associated with that session that are not stored in te Application collections.

James :) James Culshaw
jculshaw@active-data-solutions.co.uk
 
Ok, that makes sense. But I'm wondering if it destroyed the session variables before it executes the code in the Session_End therefore not allowing the code to find the current user in the application variable (and not allowing the name. =(

It's wierd that the same code works find when called upon by session.abandon but not when the session times out.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top