469,352 Members | 1,806 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,352 developers. It's quick & easy.

How to limit logons to a website

What is the best way to limit logons to a website? We assign a user ID and
password to each user. These are stored in the database (SQL Server). We
want to do two things:

1. Only allow one person to use a specific user ID at a time. So if I log
on as user ABC and then someone else tries to logon as ABC, they will not be
allowed to logon.

2. Limit the total number of users logged on at a given time. So say there
are 10 users and we want to only allow 3 to use the site at a time. So if 3
people are already logged on and a 4th person tries to log on, they will be
rejected.

Are there any "standard" ways to implement this kind of functionality?

Thanks,
Dennis

Jul 19 '05 #1
1 1711
1.) You could record whether or not the person is logged in, in your
database.
2.) Set an Application variable to the current number of users.

Both of these "solutions" have the same problem, you need some way of
logging a person out, and reducing the Application variable. A "good" user
will click on your logout button which you could use to change the two
values.
You can use Session_onEnd to change the values but it's not very
reliable.... http://www.aspfaq.com/show.asp?id=2078


"Dennis Bronstein" <db********@yahoo.com> wrote in message
news:OF**************@tk2msftngp13.phx.gbl...
What is the best way to limit logons to a website? We assign a user ID and password to each user. These are stored in the database (SQL Server). We
want to do two things:

1. Only allow one person to use a specific user ID at a time. So if I log on as user ABC and then someone else tries to logon as ABC, they will not be allowed to logon.

2. Limit the total number of users logged on at a given time. So say there are 10 users and we want to only allow 3 to use the site at a time. So if 3 people are already logged on and a 4th person tries to log on, they will be rejected.

Are there any "standard" ways to implement this kind of functionality?

Thanks,
Dennis

Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by César Santos | last post: by
5 posts views Thread by Bruno Mendonça | last post: by
6 posts views Thread by Nosferatum | last post: by
OuTCasT
1 post views Thread by OuTCasT | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.