How to limit logons to a website

D

Dennis Bronstein

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
 
T

Tom B

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,265
Messages
2,571,069
Members
48,771
Latest member
ElysaD

Latest Threads

Top