Session variables and Session_OnEnd

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
 
R

Ravikanth[MVP]

Hi

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

Ravikanth
 
H

Hans Kesting

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
 
N

Natty Gur

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
 
H

Hans Kesting

Thanks,

I did search for it, but couldn't find the correct entry.

Hans Kesting
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top