Preventing same user from logging twice

Discussion in 'ASP General' started by Karthik, Mar 18, 2005.

  1. Karthik

    Karthik Guest

    Hi,

    I have a website running on ASP.Net on IIS 6.0. This website has more than
    10000 users login everyday. At times the users login with the same user name
    and password more than once at the same time.

    I would like to prevent this from happening as it creates a huge problem at
    the back end (SQL 2k).

    I maintain all logins in a session to validate. For example if userid "xyz"
    logs in, I maintain "xyz" in a session.

    Is there any other way to traverse through all the session values? This way
    I would be able to prevent "xyz" from logging in again, when he is already
    logged in.

    Can someone please help me as I am facing a lot of problem because of this?

    Thank you.

    Regards,
    Kart
     
    Karthik, Mar 18, 2005
    #1
    1. Advertising

  2. Karthik

    Patrice Guest

    IMO not easy. The easiest way I see would be to record at login time the
    session id and to accept request only with this id. Note though that it
    means that if someone logs in under an account, the currently connected
    person will be unable to carry on its session.

    If you do it the other way round (ie. keeping the session for the first
    connected person) you'll ran into issues caused by the need to be able to
    distinguish that the session expired...

    Actually my first thought would be rather to see if the problem caused by
    multiple sessions could be corrected. Generally this is when you associate
    some temporary data with the user instead of associating these data with the
    session (for example in a temp table you may want to use the sessionid
    rather than the user id).

    Patrice

    --

    "Karthik" <> a écrit dans le message de
    news:...
    > Hi,
    >
    > I have a website running on ASP.Net on IIS 6.0. This website has more than
    > 10000 users login everyday. At times the users login with the same user

    name
    > and password more than once at the same time.
    >
    > I would like to prevent this from happening as it creates a huge problem

    at
    > the back end (SQL 2k).
    >
    > I maintain all logins in a session to validate. For example if userid

    "xyz"
    > logs in, I maintain "xyz" in a session.
    >
    > Is there any other way to traverse through all the session values? This

    way
    > I would be able to prevent "xyz" from logging in again, when he is already
    > logged in.
    >
    > Can someone please help me as I am facing a lot of problem because of

    this?
    >
    > Thank you.
    >
    > Regards,
    > Kart
    >
     
    Patrice, Mar 18, 2005
    #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. Lawrance
    Replies:
    0
    Views:
    464
    Lawrance
    Nov 30, 2003
  2. James Hawkins
    Replies:
    2
    Views:
    458
    James Hawkins
    Nov 16, 2006
  3. Ned White
    Replies:
    11
    Views:
    773
    Jerry C
    May 21, 2008
  4. Replies:
    2
    Views:
    969
  5. Rajesh.V

    Same user twice in the same aspx..

    Rajesh.V, Aug 6, 2003, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    139
    Rajesh.V
    Aug 6, 2003
Loading...

Share This Page