473,406 Members | 2,769 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Logoff and terminate an ASP.NET session?

TR
What is the best practice for implementing a Logoff feature so that the
user's session is terminated and session state memory is released?
Thanks
TR
Nov 19 '05 #1
6 5037
Session.Abandon();
and it can help to avoid confusion by closing the browser window as well.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"TR" <tr@anonymous.biz> wrote in message
news:e$**************@TK2MSFTNGP12.phx.gbl...
What is the best practice for implementing a Logoff feature so that the
user's session is terminated and session state memory is released?
Thanks
TR

Nov 19 '05 #2
if its signing out of forms, create a link to a page that have this
code....

Sub Page_Load
FormsAuthentication.SignOut()
End Sub

...and youre ready to go.
*---------------------------------*
Posted at: http://www.GroupSrv.com
*---------------------------------*

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 19 '05 #3
TR
Thanks. Seems almost too easy :-) Garbage collector handles cleanup of
session variables?
TR

"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:eq**************@TK2MSFTNGP12.phx.gbl...
Session.Abandon();
and it can help to avoid confusion by closing the browser window as well.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"TR" <tr@anonymous.biz> wrote in message
news:e$**************@TK2MSFTNGP12.phx.gbl...
What is the best practice for implementing a Logoff feature so that the
user's session is terminated and session state memory is released?
Thanks
TR


Nov 19 '05 #4
TR
Thanks. We're not using Forms Auth at the moment, but would .SignOut() be
called instead of Session.Abandon()? The docs read "[The SignOut method]
removes either durable or session cookies." Is that synonymous with
terminating the session?
TR

"bmongtangco" <bm*********@yahoo-dot-com.no-spam.invalid> wrote in message
news:42********@127.0.0.1...
if its signing out of forms, create a link to a page that have this
code....

Sub Page_Load
FormsAuthentication.SignOut()
End Sub

..and youre ready to go.
*---------------------------------*
Posted at: http://www.GroupSrv.com
*---------------------------------*

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com

Nov 19 '05 #5
Yes.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"TR" <tr@anonymous.biz> wrote in message
news:O2**************@TK2MSFTNGP14.phx.gbl...
Thanks. Seems almost too easy :-) Garbage collector handles cleanup of
session variables?
TR

Nov 19 '05 #6
>> would .SignOut() be called instead of Session.Abandon()?

No, use Session.Abandon also.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
Nov 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Arun Goel | last post by:
Hi all, I have set up rmiregistry.exe to run as service on Windows 2000 Server .. I set it up using "srvany.exe". It is running fine, but when I logoff, it stops.I did a lot of research but I...
8
by: Jonathan Heath | last post by:
Hi all, I have created an ASP script that enters data into an Access Database. My problem is that I'd like this script to run when the computer is shutdown or the user logs off. I think...
1
by: puppet_sock | last post by:
Does the breaking of an ODBC connection produce a logoff event? I can't seem to get it to. What I was hoping was to use a trigger to do automatic cleanup of session specific data. But the...
2
by: Michael | last post by:
Hi, I was creating a trigger to fire when a user ends a session, but I see that you could have it fire on a SCHEMA event : CREATE TRIGGER "SRU"."TEST" BEFORE LOGOFF ON "SRU".SCHEMA or a...
4
by: Kurt | last post by:
Hi I am using CDO 1.21 from C# in order to iterate through the entries in a users outlook address book (as OOM was too slow). Basically I take the Name field from each "message" and insert it into...
1
by: Roberto Kohler | last post by:
Is there a way for an administrator to terminate ASP sessions if I know the ASP Session IDs that I want to terminate? Session.Abandon only works on the caller's session. Is there something like...
3
by: ad | last post by:
In some condition, like another user log in with the some ID, I want to close a user's session. How can we terminate a user's session with program?
8
by: Jm | last post by:
Hi All I have an app that when running if a user selects logoff or shutdown from the start menu, it will close itself but not logoff windows or shutdown. From what i have found so far its most...
1
by: islandfong | last post by:
I have a list of job scheduled to be executed in sequence with Oracle 10g. Each of these jobs could take quite a long time to run. Eventually user may decide to terminate the execution of the job in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.