Session
-
1. for Sign in ------------- Session["original"]=user_id.Text; FormsAuthentication.RedirectFromLoginPage(user_id.Text,false); for sign Out ------------ FormsAuthentication.SignOut(); The problem is after sign out from user acount if I use Internet Explorer Back Option , I am able to enter my previous logged in page. How can i stop it. i.e. after logout from my account, if i use Internet Explorer Back Option ,then a message will come that your session is over. How can i do this.
-
1. for Sign in ------------- Session["original"]=user_id.Text; FormsAuthentication.RedirectFromLoginPage(user_id.Text,false); for sign Out ------------ FormsAuthentication.SignOut(); The problem is after sign out from user acount if I use Internet Explorer Back Option , I am able to enter my previous logged in page. How can i stop it. i.e. after logout from my account, if i use Internet Explorer Back Option ,then a message will come that your session is over. How can i do this.
It happens because browser loads the page from the local cache. Try this. On Page_Load of each page. Response.Cache.SetCacheability(HttpCacheability.NoCache); Response.Cache.SetExpires(DateTime.Now.ToUniversalTime()); On the Sign Out button click, Session.Abandon(); FormsAuthentication.SignOut(); Response.Redirect(FormsAuthentication.LoginUrl);
------------------------------------------------------------ "The only true wisdom is in knowing you know nothing." --Socrates
-
It happens because browser loads the page from the local cache. Try this. On Page_Load of each page. Response.Cache.SetCacheability(HttpCacheability.NoCache); Response.Cache.SetExpires(DateTime.Now.ToUniversalTime()); On the Sign Out button click, Session.Abandon(); FormsAuthentication.SignOut(); Response.Redirect(FormsAuthentication.LoginUrl);
------------------------------------------------------------ "The only true wisdom is in knowing you know nothing." --Socrates