Currently my ASP.Net webform uses FormsAuthentication.SignOut();
Problem is this:
User goes to loginpage and logs in and gets redirected to page A
In page A he clicks on logout and gets redirected to
loginpage.
In login page load event I have FormsAuthentication.SignOut().
I assume this will destroy the authentication cookie.
But user can a still use browser's back button to go to the A page!
Is this accepted? and if not what the best way to fix
=============== I tried the following but still No luck:
Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetNoStore();
Question itself is duplicate but none of the provided answers in the other question works. So the is not a working answer.
Also these do not work:
Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetNoStore();
FormsAuthentication.SignOut();
Session.Abandon();
Also tried FormAthentcation.RedirectToLoginPage
Still back button works.
Update: I found a workaround but it will only work if the browser backbutton cause ANY form/page event be fire. Do you know if backbutton fires any form event?