Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. how to Allow only one session per user at a time

how to Allow only one session per user at a time

Scheduled Pinned Locked Moved ASP.NET
databasetutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Ashraf Fathy
    wrote on last edited by
    #1

    Hii All, I need to make my web site doesn't accept any user to login twice at the same time with the same account, while need some other user kind to login with the same account up to five times ps: the login validation is run through database, then i give him some sessions like "id, name, ... etc" Thanx for helping Ashraf Fathy +20101985158

    G M 2 Replies Last reply
    0
    • A Ashraf Fathy

      Hii All, I need to make my web site doesn't accept any user to login twice at the same time with the same account, while need some other user kind to login with the same account up to five times ps: the login validation is run through database, then i give him some sessions like "id, name, ... etc" Thanx for helping Ashraf Fathy +20101985158

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      Create a table to store the logins for the users. That way you can keep track of how many sessions any user has. You would need a separate table for this, so that you can store the time when the user logged in, otherwise you can't know if the session is likely to have ended in case the user failed to log out. You also might want to update the table with the time for every page the user requests, if you want to see if the user is still active. --- b { font-weight: normal; }

      1 Reply Last reply
      0
      • A Ashraf Fathy

        Hii All, I need to make my web site doesn't accept any user to login twice at the same time with the same account, while need some other user kind to login with the same account up to five times ps: the login validation is run through database, then i give him some sessions like "id, name, ... etc" Thanx for helping Ashraf Fathy +20101985158

        M Offline
        M Offline
        minhpc_bk
        wrote on last edited by
        #3

        Hi there, In addition, you can also check out the article Preventing Multiple Logins in ASP.NET[^]

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups