authentication error in log out

Posted by Dipu710646 under Regular Expressions on 12/28/2010 | Points: 10 | Views : 1082 | Status : [Member] | Replies : 1
Hi All,

I wes using login view an login status to achieve authentication in my app.

But after logging out if I press the back button of the browser, it is still going back to Home page.

What may be the error.

Here is the code.

protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
if ((Login1.UserName == "sana") && (Login1.Password == "sana"))
FormsAuthentication.RedirectFromLoginPage(Login1.UserName, false);
e.Authenticated = false;


I have used this line to sign out..



Posted by: SheoNarayan on: 12/28/2010 [Administrator] HonoraryPlatinum | Points: 25

I think it is the default behavior of the browser that it shows the last page when you click on back button. To avoid that you can do following

1. Implement the code that is written at exactly the same you are looking for.
2. Render the JavaScript code that closes the browser or ask the user to close the browser.

Hope this will resolve your issue.


Sheo Narayan

Dipu710646, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response