Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / October 2005

Tip: Looking for answers? Try searching our database.

Session.abandon and Session.Cleear: what is the difference

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JJ_377@hotmail.com - 28 Oct 2005 16:09 GMT
What is the difference between Session.Abandon and Session.Clear?
Thank you.
Juan T. Llibre - 28 Oct 2005 16:19 GMT
Session.Clear stays in the same session.
Session.Abandon dumps the current session and starts a new session.

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
> What is the difference between Session.Abandon and Session.Clear?
> Thank you.
Sreejith Ram - 28 Oct 2005 16:30 GMT
Session.Abandon() will end current session
Session_End will be fired and next request will fire Session_Start

Session.Clear will just clear the session data , the session is still alive

Session ID will remain same in both cases, as long as the browser is not
closed.

> What is the difference between Session.Abandon and Session.Clear?
> Thank you.
JJ_377@hotmail.com - 29 Oct 2005 22:03 GMT
Thank you - my further question,s what is recommended in terms of
clearing any session variables in the context of:
1. on error, I want any session variables cleared and the user
redirected to a logon page
( I wish to prevent a user from reentering the error page and
recreating the original error)
3. I wish to prevent others from "backing" into web pages if a user
does not log out and session timeout has not yet occurred.

I have the web pages set so that the browser will not cache them

It kind of sounds like I just need Session.clear, but I have been using
Session.Abandon.

MY thanks!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.