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. Session Not Ending even after Logging Out!!

Session Not Ending even after Logging Out!!

Scheduled Pinned Locked Moved ASP.NET
questionsecurityhelp
3 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.
  • S Offline
    S Offline
    SrividhyaS
    wrote on last edited by
    #1

    I am developing a Web Application in which I have included User Authentication.But the Session is not ending up even after logging out from the Application.That is,When Click Logout Hyperlink,It gets redirected to Logout.aspx.But when I click on the Back button of the explorer page it takes to my previous page with all the datas.How can I correct this? FYI, I am using Session.Abandon()-To end the session And I maintain a Session variable "Username" which is needed to be displayed in every page of my application. Kindly help me out to secure my application...Thanks in Advance!!

    Happy Programming!!!

    N S 2 Replies Last reply
    0
    • S SrividhyaS

      I am developing a Web Application in which I have included User Authentication.But the Session is not ending up even after logging out from the Application.That is,When Click Logout Hyperlink,It gets redirected to Logout.aspx.But when I click on the Back button of the explorer page it takes to my previous page with all the datas.How can I correct this? FYI, I am using Session.Abandon()-To end the session And I maintain a Session variable "Username" which is needed to be displayed in every page of my application. Kindly help me out to secure my application...Thanks in Advance!!

      Happy Programming!!!

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

      SrividhyaS wrote:

      That is,When Click Logout Hyperlink,It gets redirected to Logout.aspx.But when I click on the Back button of the explorer page it takes to my previous page with all the datas

      Your session is ending properly. But what you are seeing after pressing back button is browser cached version of your page. There are some techniques to avoid caching, but none worked correctly for me. You need to check session in each page_load and if session not exist, redirect to login page. So when pressing back button, user can see the page, but he/she won't be able to continue with any operations. When page gets loaded, your session check function will redirect you to login page if it not exist.


      My Website | Ask smart questions

      1 Reply Last reply
      0
      • S SrividhyaS

        I am developing a Web Application in which I have included User Authentication.But the Session is not ending up even after logging out from the Application.That is,When Click Logout Hyperlink,It gets redirected to Logout.aspx.But when I click on the Back button of the explorer page it takes to my previous page with all the datas.How can I correct this? FYI, I am using Session.Abandon()-To end the session And I maintain a Session variable "Username" which is needed to be displayed in every page of my application. Kindly help me out to secure my application...Thanks in Advance!!

        Happy Programming!!!

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

        Hi there, well is quite a lil problem as i also phase with same. as u state that after logging out the page come with data on doing back... this is true as this page comes from the existing cache which already contains that page with all the data previously accessed, now if u do cntrl+F5 you didnt found any of the data on that page as now page get loads again....

        Hello Forum Always be in touch to help about the topic ASP.NET

        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