Session variables and Session_OnEnd

  • Thread starter Thread starter Hans Kesting
  • Start date Start date
H

Hans Kesting

Hi,

When the Session_OnEnd event fires, do the Session variables still exist?
I want to do some cleanup (update some records in a database etc.),
but then I need to know *which* recopds to update ...

Can I access these session variables through HttpContext.Current.Session ?
(the cleanup-code is in a separate class, which is defined within the
website)


Hans Kesting
 
Hi

You can access Session Variables through
HttpContext.Current.Session.

Ravikanth
 
Yes, I know, I already use that.
But: are those session variables *still* available when handling the
Session_OnEnd event?

Or to put it in another way: exactly *when* is this event fired?
- right after the session has expired (so any stored variables are gone), or
- just before expiring (so that any stored variables are still available)

I hope the second one is true, as that is the most useful.

Hans Kesting
 
MSDN :
"The Session_OnEnd event occurs when a session is abandoned or times
out. Of the server built-in objects, only the Application, Server, and
*Session* objects are available. "

Natty Gur, CTO
Dao2Com Ltd.
34th Elkalay st. Raanana
Israel , 43000
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
 
Back
Top