Your daily dosage of Asp.Net knowledge - 100% pure and additive free!
Navigation:
Home
|
All FAQ Categories
|
All FAQs
|
Top 10 FAQs
|
Most Viewed FAQs
|
Suggest new FAQ
|
Links
Main Categories:
› General
(9)
› Beginner
(39)
› ASP.NET AJAX
(8)
› C#
(13)
› LINQ
(1)
› Configuration
(10)
› Session
(4)
› WebForms
(12)
› Controls
(14)
› Caching
(1)
› Database
(1)
Visitors Online:
41
Main FAQ Category:
Session (4)
Also in:
Beginner
(39)
C#
(13)
How to explicitly end users Session?
Posted: 17-Apr-2008
Updated: 17-Apr-2008
Views: 13019
To programmatically end current users session (for any reason) we can use
Session.Abandon
method.
When this method is called, current session becomes no longer valid (its destroyed) and new session can be started.
This method also causes
End
event of the Web Application to be fired.
You can specify a handler for the
End
event by adding a code to the
Session_End
method in the
Global.asax
file.
A Web Application
Start
event will be raised on the next request (this event can be handled by placing your code into
Session_Start
method in your Global.asax file) and a new Session will be created for the current user that requested the page.
NOTE:
Session End event fires only when Session Mode is set to
InProc
.
Found errors in this FAQ? Have a suggestion? Click
here
Printer Friendly version of this page
(Current rating:
4
out of 5 for 9 votes)
Show Comments (0)
Loading Comments. Please Wait...