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
  1. Home
  2. Web Development
  3. ASP.NET
  4. Restrict Multiple login

Restrict Multiple login

Scheduled Pinned Locked Moved ASP.NET
questioncsharpasp-netcareer
6 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.
  • _ Offline
    _ Offline
    _mubashir
    wrote on last edited by
    #1

    Hii, I am working on a Web Application Asp.NET 1.1 I want to restrict multiple login at the same time in my web application. eg, If someone is logged in with Username 'mubashir', no one else wold be able to log in with username 'mubashir' till the first one is logged out. How do I go about doing this? thanks, Mubashir

    Every job is a self portrait of the person who did it.

    _ 1 Reply Last reply
    0
    • _ _mubashir

      Hii, I am working on a Web Application Asp.NET 1.1 I want to restrict multiple login at the same time in my web application. eg, If someone is logged in with Username 'mubashir', no one else wold be able to log in with username 'mubashir' till the first one is logged out. How do I go about doing this? thanks, Mubashir

      Every job is a self portrait of the person who did it.

      _ Offline
      _ Offline
      _AK_
      wrote on last edited by
      #2

      One way could be to have a boolean field in the database for the user and once the user is logged in you can make that field to true and check it with that when the user is trying to log for the next time.

      Best Regards, Apurva Kaushal

      _ P 2 Replies Last reply
      0
      • _ _AK_

        One way could be to have a boolean field in the database for the user and once the user is logged in you can make that field to true and check it with that when the user is trying to log for the next time.

        Best Regards, Apurva Kaushal

        _ Offline
        _ Offline
        _mubashir
        wrote on last edited by
        #3

        Thanx, But i need to reset that bool field when the user will log off. What if the user logs off in an abnormal way? Ho do I reset it then? regards, Mubashir

        Every job is a self portrait of the person who did it.

        _ 1 Reply Last reply
        0
        • _ _mubashir

          Thanx, But i need to reset that bool field when the user will log off. What if the user logs off in an abnormal way? Ho do I reset it then? regards, Mubashir

          Every job is a self portrait of the person who did it.

          _ Offline
          _ Offline
          _AK_
          wrote on last edited by
          #4

          You can have a look at This[^]

          Best Regards, Apurva Kaushal

          1 Reply Last reply
          0
          • _ _AK_

            One way could be to have a boolean field in the database for the user and once the user is logged in you can make that field to true and check it with that when the user is trying to log for the next time.

            Best Regards, Apurva Kaushal

            P Offline
            P Offline
            P A N K A J
            wrote on last edited by
            #5

            you can set all the user logged in the application variable means as a arraylist. when somebody logout the session_end event fired. you can trap a user & delete it from application arraylist.

            Pankaj Gupta (Take it easy)

            _ 1 Reply Last reply
            0
            • P P A N K A J

              you can set all the user logged in the application variable means as a arraylist. when somebody logout the session_end event fired. you can trap a user & delete it from application arraylist.

              Pankaj Gupta (Take it easy)

              _ Offline
              _ Offline
              _AK_
              wrote on last edited by
              #6

              But session_end event will not get fired in case is the session is being ended abnormally.. So not in all the case this will work.

              Best Regards, Apurva Kaushal

              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