Results 1 to 5 of 5

Thread: Abandon using SessionID????

  1. #1

    Thread Starter
    Hyperactive Member jeba's Avatar
    Join Date
    Feb 2000
    Posts
    265

    Abandon using SessionID????

    Hi there!
    Is it possible to abandon the session using the SessionID?
    Since Session_onEnd event is not firing all times, I just want to know how can I abandon the session atleast manually.

    Please help.
    J£ßä

  2. #2
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    Session.abandon
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

  3. #3

    Thread Starter
    Hyperactive Member jeba's Avatar
    Join Date
    Feb 2000
    Posts
    265
    Hi monte96!
    thanks for the reply. If the user logout through the LOGOUT.ASP page, then I can call the session.abandon method. No problem with this approach.
    If the user closes the browser(without logging out), then session timeout after 20 mins. But the problem is session_onEnd event doesn't fire always. So some of the sessions are not anandoned/expired. This is the problem, because I am setting the user's login status to true in the database when the user login. I am setting the status back to false in Logout page as well as in the Session_onEnd event. So if the Session_onEnd event doesn't fire (after 20 mins - because the user has closed the browser without logging out), then the user can never login to my site, because his status is true in the database. This I am checking in order to prevent multiple login of the same user.

    Please help me.
    J£ßä

  4. #4
    Fanatic Member Psyrus's Avatar
    Join Date
    Jul 2000
    Location
    NJ
    Posts
    602
    jeba,

    Have you tried redirecting to the logout page in the UNLOAD event?

    <body ONUNLOAD = "window.location = 'logout.asp';">

    Not sure if it will work but it's worth a shot.


    Chris
    Chris

    VB 6.0 Calendar App Video Gamers Group
    Don't forget to rate people if they helped you.

  5. #5
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    What you will probably end up having to do, is create an COM component with a timer that you create in the session and have it do the tracking for you. Basically, you'd have a keepalive method that must be called on each page or (have it time out after a shorter time than the session does) it starts counting down. I'm sure there's a MSDN article on why the onend event is not firing..
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

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