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 end the session of chrome browser in asp.net (it is working in IE but not in Chrome)

how to end the session of chrome browser in asp.net (it is working in IE but not in Chrome)

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nettutorial
4 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.
  • V Offline
    V Offline
    ven753
    wrote on last edited by
    #1

    I have created web application in asp.net. After session.Abandon() i am able to end the session in which i cannot go back and it will redirect to loginpage. But if i run in Google Chrome browser it is not working and if i click back it will come priviously opened page with data. how to end the session of chrome browser in asp.net. If anybody knows, please reply me. Thanks in advance.

    J 1 Reply Last reply
    0
    • V ven753

      I have created web application in asp.net. After session.Abandon() i am able to end the session in which i cannot go back and it will redirect to loginpage. But if i run in Google Chrome browser it is not working and if i click back it will come priviously opened page with data. how to end the session of chrome browser in asp.net. If anybody knows, please reply me. Thanks in advance.

      J Offline
      J Offline
      jkirkerx
      wrote on last edited by
      #2

      I think you have to abandon and remove all Session.removeAll();

      V 1 Reply Last reply
      0
      • J jkirkerx

        I think you have to abandon and remove all Session.removeAll();

        V Offline
        V Offline
        ven753
        wrote on last edited by
        #3

        I did that also. It is not working for Google Chrome browser.

        J 1 Reply Last reply
        0
        • V ven753

          I did that also. It is not working for Google Chrome browser.

          J Offline
          J Offline
          jkirkerx
          wrote on last edited by
          #4

          Technically session.removeAll works. Keep in mind that it's a server side call, and will erase all the session values on the web server. Now if the browser still honors the session value, or thinks that the session value is valid, then that's a browser issue, or something else on the server is keeping the session value alive. So you make a session in a test page, that contains a word or something, and click a button to remove all, and see if the session is erased., and play around with it. I know that in certain modes, the session value will write a cookie on the client, with the session values. Using Firefox to examine the cookie values is useful to confirm the removal of the session value. Chrome has alot of bugs in it, and became very bloated with code. It could just be a Chrome issue. That's out of your control, nothing you can do about it. [EDIT] Maybe it's the way you implemented the session, eg.

          Dim m_context as httpcontext = httpcontext.current
          m_context.session.add("Login", true)

          if (true = m_context.session("Login") then
          m_conetxt.response.redirect("admin.aspx")
          End if

          or perhaps the correct context was not used to create or remove the session, or the spelling of the session name does not exactly match. Don't forget to delete your browser cache for a true test.

          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