-
Mar 18th, 2004, 12:46 AM
#1
Thread Starter
PowerPoster
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?
-
Mar 18th, 2004, 03:59 AM
#2
Frenzied Member
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.
-
Mar 18th, 2004, 04:26 AM
#3
Thread Starter
PowerPoster
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
-
Mar 18th, 2004, 04:29 AM
#4
Frenzied Member
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.
-
Mar 18th, 2004, 04:34 AM
#5
Thread Starter
PowerPoster
okay, will try it out. thx
-
Mar 18th, 2004, 08:40 AM
#6
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 :
-
Mar 18th, 2004, 12:49 PM
#7
Frenzied Member
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
-
Mar 18th, 2004, 03:34 PM
#8
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|