Logoff and terminate an ASP.NET session?

Discussion in 'ASP .Net' started by TR, Feb 9, 2005.

  1. TR

    TR Guest

    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
    TR, Feb 9, 2005
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:e$...
    > 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
    >
    >
    Steve C. Orr [MVP, MCSD], Feb 9, 2005
    #2
    1. Advertising

  3. TR

    bmongtangco Guest

    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
    bmongtangco, Feb 9, 2005
    #3
  4. TR

    TR Guest

    Thanks. Seems almost too easy :) Garbage collector handles cleanup of
    session variables?
    TR

    "Steve C. Orr [MVP, MCSD]" <> wrote in message
    news:...
    > 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" <> wrote in message
    > news:e$...
    > > 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
    > >
    > >

    >
    >
    TR, Feb 9, 2005
    #4
  5. TR

    TR Guest

    Re: re:Logoff and terminate an ASP.NET session?

    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" <-spam.invalid> wrote in message
    news:420989c4_4@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
    TR, Feb 9, 2005
    #5
  6. Yes.

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://SteveOrr.net


    "TR" <> wrote in message
    news:...
    > Thanks. Seems almost too easy :) Garbage collector handles cleanup of
    > session variables?
    > TR
    Steve C. Orr [MVP, MCSD], Feb 9, 2005
    #6
  7. Re: re:Logoff and terminate an ASP.NET session?

    >> 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
    Steve C. Orr [MVP, MCSD], Feb 9, 2005
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tariq_swl

    Widows Service Event for LogOff

    tariq_swl, Oct 1, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    496
    tariq_swl
    Oct 1, 2005
  2. Hari Om
    Replies:
    1
    Views:
    28,325
    Wendy S
    Oct 8, 2003
  3. David Jenkins

    Java app dies on logoff

    David Jenkins, Nov 5, 2003, in forum: Java
    Replies:
    3
    Views:
    4,169
    David Jenkins
    Nov 6, 2003
  4. Adam Sandler

    How to keep JRE running at W2K logoff?

    Adam Sandler, Jul 7, 2005, in forum: Java
    Replies:
    4
    Views:
    2,960
    Adam Sandler
    Jul 11, 2005
  5. How Capture windows2003 users login and logoff time.

    , Jun 24, 2007, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    742
    Teemu Keiski
    Jun 30, 2007
Loading...

Share This Page