Multiple login protection

Results 1 to 4 of 4

Thread: Multiple login protection

  1. #1
    Paul Winfield Guest

    Default Multiple login protection

    Question on ASP: I&#039ve developed a site which requires users to be logged on for full access, the problem is that I don&#039t want 2 or more simultaneous logins from a given user.<BR><BR>I have my "user accounts" set up in a SQL Server db and carry details of the logged in user in a couple of session variables (yep, I know they&#039re nasty &#060;g&#062;)<BR><BR>Any ideas are much appreciated!

  2. #2
    michal m Guest

    Default RE: Multiple login protection

    Hi Paul,<BR>You can add a table to track active sessions which will hold userid for users who are logged in. When someone tries to login and they are already in the table you deny access. To purge people from the "logged in" table by a) adding code to SessionOnEnd b) automatically purging after a given period of time. <BR>I have never implemented this so I might be missing some issues but just thought I&#039d give you an idea.<BR><BR>HTH,<BR>Michal

  3. #3
    Paul Winfield Guest

    Default RE: Multiple login protection

    Hi Michal<BR><BR>Thanks for the reply - I was thinking along similar lines but I&#039m on the understanding that the Session.OnEnd event is unreliable and disconnections can sometimes avoid causing the vent to fire - I could end up with login records in the table which are no longer valid. I think I will experiment with this anyway though...

  4. #4
    Portrman Guest

    Default RE: Multiple login protection

    Similiar to the other suggestion. But instead of having a table where you add the users UID when they logon. Have a table with all the ID then a field in the table that indicates whether they are logged in or not. It might be a little simpliar, then it is a simple compare procedure.

Posting Permissions

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