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