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. pls help restricting multiple logon to an application with single user account.

pls help restricting multiple logon to an application with single user account.

Scheduled Pinned Locked Moved ASP.NET
databasehelpannouncement
9 Posts 4 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.
  • S Offline
    S Offline
    surender939
    wrote on last edited by
    #1

    pls help restricting multiple logon to an application with single user account. Here wht m doing is , m checking login details against a database. if is a valid user then allowing to browse throuth the application. my requirement is if one user is loged in and if someother user tries to login with same user account i need to restrict the second user saying "this login is already in use". I can maintain a temp table for this , whenever a login is success i can update "isloged" field as true and we can set it false when user logs out. but how can we handle situations like if a user logs in and closes bowser close button instead of log out. if a user logs in and leaves doing nothing. pls help in resolving this, if possible write a sample code for me. thanks in advance.

    L D N 3 Replies Last reply
    0
    • S surender939

      pls help restricting multiple logon to an application with single user account. Here wht m doing is , m checking login details against a database. if is a valid user then allowing to browse throuth the application. my requirement is if one user is loged in and if someother user tries to login with same user account i need to restrict the second user saying "this login is already in use". I can maintain a temp table for this , whenever a login is success i can update "isloged" field as true and we can set it false when user logs out. but how can we handle situations like if a user logs in and closes bowser close button instead of log out. if a user logs in and leaves doing nothing. pls help in resolving this, if possible write a sample code for me. thanks in advance.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Repost

      The Web Developer. Beirout-Lebanon

      S 1 Reply Last reply
      0
      • L Lost User

        Repost

        The Web Developer. Beirout-Lebanon

        S Offline
        S Offline
        surender939
        wrote on last edited by
        #3

        yes, its a repost... waiting for the solution......... thanks

        L 1 Reply Last reply
        0
        • S surender939

          yes, its a repost... waiting for the solution......... thanks

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          why you don't search for the solution rather tahn reposting and waiting do you know that google is your friend

          The Web Developer. Beirout-Lebanon

          S 1 Reply Last reply
          0
          • L Lost User

            why you don't search for the solution rather tahn reposting and waiting do you know that google is your friend

            The Web Developer. Beirout-Lebanon

            S Offline
            S Offline
            surender939
            wrote on last edited by
            #5

            You would not say m not trying for the solution if you would have studied my post clearly. I have mentioned everything , Try to help someone.

            1 Reply Last reply
            0
            • S surender939

              pls help restricting multiple logon to an application with single user account. Here wht m doing is , m checking login details against a database. if is a valid user then allowing to browse throuth the application. my requirement is if one user is loged in and if someother user tries to login with same user account i need to restrict the second user saying "this login is already in use". I can maintain a temp table for this , whenever a login is success i can update "isloged" field as true and we can set it false when user logs out. but how can we handle situations like if a user logs in and closes bowser close button instead of log out. if a user logs in and leaves doing nothing. pls help in resolving this, if possible write a sample code for me. thanks in advance.

              D Offline
              D Offline
              Dilip H Patel
              wrote on last edited by
              #6

              Hi Surender, Dilip Here again, sorry for late response, i was busy.... so your problem is as [1] if a user logs in and closes bowser close button instead of log out. ==> if user is log in and close browser then you can call a javascript function on body's(HTML tag) unload event and in that function you can all a server side function which will perform logout procedure. for that you can use ICallback interface or you can use XMLHttpRequest. [2] if a user logs in and leaves doing nothing ==> in such situations, your session will be expired. and when session expires, you can do coding of logout in session_end event. OK, May my suggesions helpful to you. Regards Dilip Patel

              N S 2 Replies Last reply
              0
              • S surender939

                pls help restricting multiple logon to an application with single user account. Here wht m doing is , m checking login details against a database. if is a valid user then allowing to browse throuth the application. my requirement is if one user is loged in and if someother user tries to login with same user account i need to restrict the second user saying "this login is already in use". I can maintain a temp table for this , whenever a login is success i can update "isloged" field as true and we can set it false when user logs out. but how can we handle situations like if a user logs in and closes bowser close button instead of log out. if a user logs in and leaves doing nothing. pls help in resolving this, if possible write a sample code for me. thanks in advance.

                N Offline
                N Offline
                N a v a n e e t h
                wrote on last edited by
                #7

                surender939 wrote:

                if a user logs in and closes bowser close button instead of log out. if a user logs in and leaves doing nothing.

                You can write a SQL Job which checks the tables and update the flag which are expired. For this, you need to keep a timestamp which gives the last accessed time.

                All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions

                1 Reply Last reply
                0
                • D Dilip H Patel

                  Hi Surender, Dilip Here again, sorry for late response, i was busy.... so your problem is as [1] if a user logs in and closes bowser close button instead of log out. ==> if user is log in and close browser then you can call a javascript function on body's(HTML tag) unload event and in that function you can all a server side function which will perform logout procedure. for that you can use ICallback interface or you can use XMLHttpRequest. [2] if a user logs in and leaves doing nothing ==> in such situations, your session will be expired. and when session expires, you can do coding of logout in session_end event. OK, May my suggesions helpful to you. Regards Dilip Patel

                  N Offline
                  N Offline
                  N a v a n e e t h
                  wrote on last edited by
                  #8

                  dilip_rollwala wrote:

                  if user is log in and close browser then you can call a javascript function on body's(HTML tag) unload event and in that function you can all a server side function which will perform logout procedure. for that you can use ICallback interface or you can use XMLHttpRequest.

                  What if JS is disabled?

                  All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions

                  1 Reply Last reply
                  0
                  • D Dilip H Patel

                    Hi Surender, Dilip Here again, sorry for late response, i was busy.... so your problem is as [1] if a user logs in and closes bowser close button instead of log out. ==> if user is log in and close browser then you can call a javascript function on body's(HTML tag) unload event and in that function you can all a server side function which will perform logout procedure. for that you can use ICallback interface or you can use XMLHttpRequest. [2] if a user logs in and leaves doing nothing ==> in such situations, your session will be expired. and when session expires, you can do coding of logout in session_end event. OK, May my suggesions helpful to you. Regards Dilip Patel

                    S Offline
                    S Offline
                    surender939
                    wrote on last edited by
                    #9

                    Thanks dilip for ur valuable suggistions...... i'll try to implement the said things Thanks once again cheers, Try to help someone

                    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