|
-
Jan 4th, 2005, 06:50 AM
#1
Thread Starter
Addicted Member
Session End Event
Hi all,
I'm a bit weak in ASP.NET. Hence I need some help in this. how to fire the session_end event when the browser is closed so that i can write some cleanup code like formauthentication.signout etc.,
Hope u all understood wot i want.. though i am brief and little unclear in the explanation.
Last edited by pavan; Jan 11th, 2005 at 03:04 AM.
Pavan Kumar
-
Jan 7th, 2005, 03:49 AM
#2
Retired VBF Adm1nistrator
Re: Session End Event
No events are triggered when the browser is closed. HTTP is a stateless protocol so you will never know when the browser is gone.
If you have stored data in your Session, you can use the Session_End event in global.asax yourself.
Or alternatively, when users are browsing the site you could check if Session("authenticated") = True, and if not, or its equal to vbNullString, then they're either not authenticated or their Session variable has timed out and was automatically removed.
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Jan 7th, 2005, 11:52 PM
#3
PowerPoster
Re: Session End Event
I have heard of it working, but only spotty at best. But as plenderj said, the browser really doesn't have to report back. What if it crashes? Don't ever count on this event to work right when the browser closes. Count on it firing after the session times out instead.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|