Results 1 to 2 of 2

Thread: SessionId problem

  1. #1

    Thread Starter
    Addicted Member Kamienios's Avatar
    Join Date
    Dec 2009
    Location
    Warsaw, Poland
    Posts
    159

    SessionId problem

    Hi,

    In my login page after a user log on to a web app i have a code which write in to the database login data:
    - User Id
    - Session Id
    - Date
    - Status: 'IN'
    etc.

    Next, When user click loginstatus control, apart from loging off the user i abandon the session.

    In global.asax in session end module I have a code which writes to the database same data with status = 'OUT'.

    I have a problem, because i found out that when a user log off from the app, and then log in one more time from the same browser window he has the same sessionId as he had in previous session.

    Why does the session doesn`t change even thought I called session.abandon?

  2. #2
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,763

    Re: SessionId problem

    Are you using ASP.NET Membership provider if so you can use FormsAuthentication.SignOut
    Else you can try Session.Clear
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width