I have developed a C# e-commerce website and I have implemented Forms Authentication to validate user on the basis of roles. Seller has two pages dashboard and Profile. When I log in to the application it redirects to the dashboard and there I have a logout button which has a code behind
protected void Button1_Click(object sender, EventArgs e)
{
FormsAuthentication.SignOut();
Response.Redirect("~/login.aspx");
}
But there is one problem when it redirects me to the dashboard, and I navigate myself to the Profile page and then I log out I am successfully redirected to log in page but when I click on browsers back button my Profile page demands me to log in with return URL query string but if I press again a back button Dashboard page doesn't demand me the login credentials and it is visible.
In short After logging out I can't access my page from which I have logged out but all those Seller pages which were visited before the page from which I logged out are visible.