Hello friends,
I have some web froms (.aspx) in a folder called “Secure” and a
web.config at the application root and the login.aspx. Everything works fine, when I logout it is redirected to Login.aspx, but when I click back on
the browser I can view the secured pages (this should not happen as I am
already logout). How to get rid of this problem???
Web.config file at the application root:
<authentication mode="Forms">
<forms
loginUrl="login.aspx" slidingExpiration="true" timeout="2"/>
</authentication>
<authorization>
<deny
users="?"/>
</authorization>
Sign-Out button code:
FormsAuthentication.SignOut();
FormsAuthentication.RedirectToLoginPage();