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. How to stop multiple login with same userid and password? - ASP

How to stop multiple login with same userid and password? - ASP

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netdatabasecomdesign
6 Posts 2 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.
  • J Offline
    J Offline
    Jaiprakash M Bankolli
    wrote on last edited by
    #1

    Hi, I know this query is not related with ASP.NET but didn't find suitable forum to post this valid web situation. I want to know how can we prevent multiple login in ASP site using same userid and password? Design suggestion are most welcome !!! Thanks,

    Regards, Jaiprakash M Bankolli jaiprakash.bankolli@gmail.com My Blog Suggestions for me Visit:www.OracleQuest.com

    A 1 Reply Last reply
    0
    • J Jaiprakash M Bankolli

      Hi, I know this query is not related with ASP.NET but didn't find suitable forum to post this valid web situation. I want to know how can we prevent multiple login in ASP site using same userid and password? Design suggestion are most welcome !!! Thanks,

      Regards, Jaiprakash M Bankolli jaiprakash.bankolli@gmail.com My Blog Suggestions for me Visit:www.OracleQuest.com

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #2

      Jaiprakash M Bankolli wrote:

      I want to know how can we prevent multiple login in ASP site using same userid and password?

      Using databases . When User login into your application , check is there any entry in the database with that user name or not. If not, make an entry and enter into the application. If yes, message that some one has already logged in into the application it the same credentials. Check it on Login

      if(UserIsInApplication(UserID))
         {
          Alert("Already Logged in with the same credentials..."
         }   
          else
          {
           MakeDBEntry(UserID);
           LoginApplicatin(UserID);
          }
      

      Note : You have to implement all those methods, I have given just for your understanding Remove the DataEntry from database when user log off Application , other wise user never be logged into the application . Here is another Tricks , What happend , If user close the browser instead of Click on "Logoff" :) [Added]

      Jaiprakash M Bankolli wrote:

      know this query is not related with ASP.NET

      Apologies. I didn't read this section . Extremely sorry. [/Added]

      cheers, Abhijit

      J 1 Reply Last reply
      0
      • A Abhijit Jana

        Jaiprakash M Bankolli wrote:

        I want to know how can we prevent multiple login in ASP site using same userid and password?

        Using databases . When User login into your application , check is there any entry in the database with that user name or not. If not, make an entry and enter into the application. If yes, message that some one has already logged in into the application it the same credentials. Check it on Login

        if(UserIsInApplication(UserID))
           {
            Alert("Already Logged in with the same credentials..."
           }   
            else
            {
             MakeDBEntry(UserID);
             LoginApplicatin(UserID);
            }
        

        Note : You have to implement all those methods, I have given just for your understanding Remove the DataEntry from database when user log off Application , other wise user never be logged into the application . Here is another Tricks , What happend , If user close the browser instead of Click on "Logoff" :) [Added]

        Jaiprakash M Bankolli wrote:

        know this query is not related with ASP.NET

        Apologies. I didn't read this section . Extremely sorry. [/Added]

        cheers, Abhijit

        J Offline
        J Offline
        Jaiprakash M Bankolli
        wrote on last edited by
        #3

        I had same design in mind but had stuck with the point that you have mentioned "What will happen , If user close the browser instead of Click on "Logoff"... So if you have some more idea in mind let me know ... Thanks anyways !!

        Regards, Jaiprakash M Bankolli jaiprakash.bankolli@gmail.com My Blog Suggestions for me Visit:www.OracleQuest.com

        A 1 Reply Last reply
        0
        • J Jaiprakash M Bankolli

          I had same design in mind but had stuck with the point that you have mentioned "What will happen , If user close the browser instead of Click on "Logoff"... So if you have some more idea in mind let me know ... Thanks anyways !!

          Regards, Jaiprakash M Bankolli jaiprakash.bankolli@gmail.com My Blog Suggestions for me Visit:www.OracleQuest.com

          A Offline
          A Offline
          Abhijit Jana
          wrote on last edited by
          #4

          Jaiprakash M Bankolli wrote:

          So if you have some more idea in mind let me know

          I had made a javascript function , that will call on the page unload if and only if , the user close the Browser ([X]), Alt+F4 and From Task Manager. on that function , I have open a popup ( Location will not be visible to user means top=10000, left =200000 like that ) and from there I have callled the server side code to clear database ;). What about yours ?

          cheers, Abhijit

          J 1 Reply Last reply
          0
          • A Abhijit Jana

            Jaiprakash M Bankolli wrote:

            So if you have some more idea in mind let me know

            I had made a javascript function , that will call on the page unload if and only if , the user close the Browser ([X]), Alt+F4 and From Task Manager. on that function , I have open a popup ( Location will not be visible to user means top=10000, left =200000 like that ) and from there I have callled the server side code to clear database ;). What about yours ?

            cheers, Abhijit

            J Offline
            J Offline
            Jaiprakash M Bankolli
            wrote on last edited by
            #5

            That sounds good idea.. Let me try that, how did you trap browser close From Task Manager.

            Regards, Jaiprakash M Bankolli jaiprakash.bankolli@gmail.com My Blog Suggestions for me Visit:www.OracleQuest.com

            A 1 Reply Last reply
            0
            • J Jaiprakash M Bankolli

              That sounds good idea.. Let me try that, how did you trap browser close From Task Manager.

              Regards, Jaiprakash M Bankolli jaiprakash.bankolli@gmail.com My Blog Suggestions for me Visit:www.OracleQuest.com

              A Offline
              A Offline
              Abhijit Jana
              wrote on last edited by
              #6

              just try this ant let me know

              //Delete User Log From Database on Browser Close
              function DeleteUserLog()
                   {
                     // Check Browser Close [X] , Alt+F4 , File -> Close   
                        if(window.event.clientX < 0 && window.event.clientY <0)
                         {
                          window.open("Removelogs.aspx", "OpenWindow_Close_Session",'left=12000,top=1200,width=10,height=1');
                         }
                   }
              

              cheers, Abhijit

              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