Results 1 to 8 of 8

Thread: Web application logon question

  1. #1

    Thread Starter
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238

    Web application logon question

    I have a web application written in ASP which require the user to logon before can access the information publish on the site.

    But my problem in to control each user account can only logon to the web application at 1 location (PC) at a time. If the same user account try to logon from others machine it will be block.

    How can I archieve this?

  2. #2
    Frenzied Member blindlizard's Avatar
    Join Date
    Feb 2001
    Location
    Austin, TX - United States of America
    Posts
    1,141
    I am not sure what you are using to track them right now, but I will assume you are using Sessions. If this is the case, save the sessionID to a database. Then remove it when either the user logs out or is timedout. So, before you log them in, you check in the DB to see if they have an active session.
    I drink to make other people more interesting!
    [vbcode]On Error GoTo Bar[/vbcode]
    http://www.monsterlizard.com

  3. #3

    Thread Starter
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238
    Yes, I am using session or store the logon state and I did not save the state into database as you mention.

    If I do so, how can I reset the state stored in database when the user just close the browser? I mean what event should I detect?

    regards,
    Chris

  4. #4
    Frenzied Member blindlizard's Avatar
    Join Date
    Feb 2001
    Location
    Austin, TX - United States of America
    Posts
    1,141
    You can't detect if they close their browser. The best you can do is put the update in the session_onend event in the global.asa file. If they do close thier browser, you can handle it one of two ways. Log out the session that is active (ie the other person gets logged out) or tell the person that is trying to login that they have to wait until the other session timeout or logs out.
    I drink to make other people more interesting!
    [vbcode]On Error GoTo Bar[/vbcode]
    http://www.monsterlizard.com

  5. #5

    Thread Starter
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238
    okay, will try it out. thx

  6. #6
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877

    Re: Web application logon question

    Originally posted by Chris
    I have a web application written in ASP which require the user to logon before can access the information publish on the site.

    But my problem in to control each user account can only logon to the web application at 1 location (PC) at a time. If the same user account try to logon from others machine it will be block.

    How can I archieve this?
    Why dont you check their IP address? That will easily tell you that wheather a user is logging on from different machine...
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  7. #7
    Frenzied Member blindlizard's Avatar
    Join Date
    Feb 2001
    Location
    Austin, TX - United States of America
    Posts
    1,141

    Re: Re: Web application logon question

    Originally posted by Danial
    Why dont you check their IP address? That will easily tell you that wheather a user is logging on from different machine...
    because you could have 2 machines on the same network
    I drink to make other people more interesting!
    [vbcode]On Error GoTo Bar[/vbcode]
    http://www.monsterlizard.com

  8. #8
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877

    Re: Re: Re: Web application logon question

    Originally posted by blindlizard
    because you could have 2 machines on the same network
    Yes i am aware of that, i was merely suggesting alternatives. You could possibly use the combination of IP check and cookies to see if user is logging in from different location.
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

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