Author: basitma | Posted on: 3/12/2009 6:32:58 PM | Views : 362

Hi,
I have an interesting scenario. I am implementing a simple website having an admin page which needs authentication before viewing admin.aspx. I am using form based authentication using cookies and my own database for storing username,pswd etc..

The issue is when i press logout button while implementing FormsAuthentication.SignOut();, I am able to signout and redirect to the login.aspx, but when i hit back button in browser(ie or mozilla) i can still view my admin page. However, at the page refresh the admin.aspx gets redirected to login.
I dont want want my admin pages to be viewed after sign out by hitting back button..
I tried to clear the browser cache using following code

1)

Response.Cache.SetCacheability(HttpCacheability.NoCache);

Response.Cache.SetNoStore();

 Response.Cache.SetNoServerCaching();

-------------------2)----Alternate code--------

Response.Buffer= true;

Response.ExpiresAbsolute=DateTime.No ...

Go to the complete details ...