How to limit logons to a website

Discussion in 'ASP General' started by Dennis Bronstein, Sep 19, 2003.

  1. 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
    Dennis Bronstein, Sep 19, 2003
    #1
    1. Advertising

  2. Dennis Bronstein

    Tom B Guest

    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" <> wrote in message
    news:...
    > 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
    >
    >
    >
    Tom B, Sep 19, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?iso-8859-1?Q?Bruno_Mendon=E7a?=

    Track Domain User Logons and Logoffs

    =?iso-8859-1?Q?Bruno_Mendon=E7a?=, Jun 3, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    4,900
    John Saunders
    Jun 4, 2004
  2. Leo

    Stopping Automated Logons

    Leo, May 9, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    384
  3. Replies:
    1
    Views:
    1,069
    Victor Bazarov
    Jun 28, 2005
  4. markeboy

    Databinding using the TreeView control using Win logons

    markeboy, Feb 16, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    115
    markeboy
    Feb 16, 2005
  5. Lance
    Replies:
    3
    Views:
    129
    Matt Garrish
    Sep 29, 2006
Loading...

Share This Page