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. Deleting session id's created by browsers on server's end

Deleting session id's created by browsers on server's end

Scheduled Pinned Locked Moved ASP.NET
questioncsharpasp-netcomsysadmin
8 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
    shankbond
    wrote on last edited by
    #1

    Hi, I am having a web application, which can be accessed by different users based on their userid's and passwords. Now I want to prevent user 1 from accessing the application from more than one system. In order to prevent this I have created a table with three columns as : userid password flag with flag having two values (true, false) true means that user is logged in false means looged off session id generated by the server when the session is created SESSION.SESSIONID gets the id generated on the IIS. reference: http://msdn.microsoft.com/en-us/library/ms524326.aspx now how can I delete it? so that there can be only one user per user id. am I right in achieving the goal? I don't want to use Asp.net MembershipProvider. thanks

    M A Y 3 Replies Last reply
    0
    • S shankbond

      Hi, I am having a web application, which can be accessed by different users based on their userid's and passwords. Now I want to prevent user 1 from accessing the application from more than one system. In order to prevent this I have created a table with three columns as : userid password flag with flag having two values (true, false) true means that user is logged in false means looged off session id generated by the server when the session is created SESSION.SESSIONID gets the id generated on the IIS. reference: http://msdn.microsoft.com/en-us/library/ms524326.aspx now how can I delete it? so that there can be only one user per user id. am I right in achieving the goal? I don't want to use Asp.net MembershipProvider. thanks

      M Offline
      M Offline
      Mike Ellison
      wrote on last edited by
      #2

      I don't think I understand what you are trying to accomplish. Are you looking to limit the IP addresses that can access the application? Are you trying to ensure that if a person is logged in through one browser that they can't be logged in from a second?

      www.MishaInTheCloud.com

      S 1 Reply Last reply
      0
      • S shankbond

        Hi, I am having a web application, which can be accessed by different users based on their userid's and passwords. Now I want to prevent user 1 from accessing the application from more than one system. In order to prevent this I have created a table with three columns as : userid password flag with flag having two values (true, false) true means that user is logged in false means looged off session id generated by the server when the session is created SESSION.SESSIONID gets the id generated on the IIS. reference: http://msdn.microsoft.com/en-us/library/ms524326.aspx now how can I delete it? so that there can be only one user per user id. am I right in achieving the goal? I don't want to use Asp.net MembershipProvider. thanks

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

        shankbond wrote:

        session id generated by the server when the session is created SESSION.SESSIONID gets the id generated on the IIS. reference: http://msdn.microsoft.com/en-us/library/ms524326.aspx now how can I delete it?

        Why you want to delete it ? How does it relates with signle user singing? Session ID is unique for each and every user. On Logoff you make sure that, data base field is reseting properly. and what about if user Close the Browser by Clicking [X] button ? You need to handel this situation also. Thanks !

        Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article

        S 1 Reply Last reply
        0
        • M Mike Ellison

          I don't think I understand what you are trying to accomplish. Are you looking to limit the IP addresses that can access the application? Are you trying to ensure that if a person is logged in through one browser that they can't be logged in from a second?

          www.MishaInTheCloud.com

          S Offline
          S Offline
          shankbond
          wrote on last edited by
          #4

          HI,

          Mike Ellison wrote:

          what you are trying to accomplish.

          Mike Ellison wrote:

          Are you trying to ensure that if a person is logged in through one browser that they can't be logged in from a second?

          yes exactly. is it possible?

          1 Reply Last reply
          0
          • A Abhijit Jana

            shankbond wrote:

            session id generated by the server when the session is created SESSION.SESSIONID gets the id generated on the IIS. reference: http://msdn.microsoft.com/en-us/library/ms524326.aspx now how can I delete it?

            Why you want to delete it ? How does it relates with signle user singing? Session ID is unique for each and every user. On Logoff you make sure that, data base field is reseting properly. and what about if user Close the Browser by Clicking [X] button ? You need to handel this situation also. Thanks !

            Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article

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

            Hi abhijit,

            Abhijit Jana wrote:

            button ?

            how can I do that? can You please help.... thanks

            A 1 Reply Last reply
            0
            • S shankbond

              Hi abhijit,

              Abhijit Jana wrote:

              button ?

              how can I do that? can You please help.... thanks

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

              shankbond wrote:

              how can I do that?

              You can try this way,

              function CheckBrowserClose()
              {

              , Alt+F4 , File -> Close

              if(window.event.clientX < 0 && window.event.clientY <0)
              {
              // Call a popup and on server side handle the database update

              }
              }

              And called it on Body unload.

              Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article

              1 Reply Last reply
              0
              • S shankbond

                Hi, I am having a web application, which can be accessed by different users based on their userid's and passwords. Now I want to prevent user 1 from accessing the application from more than one system. In order to prevent this I have created a table with three columns as : userid password flag with flag having two values (true, false) true means that user is logged in false means looged off session id generated by the server when the session is created SESSION.SESSIONID gets the id generated on the IIS. reference: http://msdn.microsoft.com/en-us/library/ms524326.aspx now how can I delete it? so that there can be only one user per user id. am I right in achieving the goal? I don't want to use Asp.net MembershipProvider. thanks

                Y Offline
                Y Offline
                yesu prakash
                wrote on last edited by
                #7

                it is possible when the window is closed or at the time of session time out, but it is not possible in case of network failuer

                S 1 Reply Last reply
                0
                • Y yesu prakash

                  it is possible when the window is closed or at the time of session time out, but it is not possible in case of network failuer

                  S Offline
                  S Offline
                  shankbond
                  wrote on last edited by
                  #8

                  Hi Abhijit and YESU,

                  yesu prakash wrote:

                  but it is not possible in case of network failuer

                  I think Yesu's point is correct , can we handle this scenario as well, it does exists in gmail though. whenever two or more users with same email id's log in, in different machines , one of them can log out all other machines. thanks

                  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