Session question

Results 1 to 3 of 3

Thread: Session question

  1. #1
    Jason Guest

    Default Session question

    I have an app im making and when a user logs in there are a few Session variables created (PermissionID, UserID, and UserName).<BR><BR>My question is, once a user logs in, I would like to write to the Users table "loggedIn" in a Yes/No field. And when that user would log off, it would deselect that field. The problem is, what happens when the users session times out? How could I deselect the "IsLoggedIn" field. The whole purpose, of course, is so multiple people could never be logged in at the same time with the same username.<BR><BR>Thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: Session question

    In theory, you could log them off using the Session_onEnd handler in Global.ASA. In practice, many have reported that Session_onEnd doesn&#039;t *always* fire.<BR><BR>So one solution is, if a user tries to log in and the DB says they are already in, you simply ask them: "Our records show that you are still logged in from another session that started at 3:07 PM on June 14th. Do you wish to end that session and log in now from this browser?" <BR><BR>You could also *always* log off the old session if it was older than some number of hours/days/whatever you feel comfortable with.<BR><BR>

  3. #3
    Jason Guest

    Default That works for me <eop>.

    Thanks Bill

Posting Permissions

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