Z
Zagor
Hi All, (thanks in advance for your time)
I have a standard login.aspx page (UserName\Password). When the user
successully sign in they are redirected to a control panel page
(admin.aspx), which contains a logout button with this code
private void OnLogOutClicked(......)
{
FormsAuthentication.SignOut();
lbStatus.Text= "You have successfully log out";
}
in this same page on PageLoad I have the below code
private void Page_Load(.....)
{
if ( Request.IsAuthenticated = = true ) {...
lbStatus.Text = "User" + User.Identity.Name + "is currenlty logged
in";}
}
The problem is that when the user clicks the "Log Out" button the label
status gets updated(fine) and if the user clicks any other buttons(on the
page) they will be automatically redirect to the login page (fine), which
basically confirm that he\she is logout and no operation can be done on the
page.
Now if I try to type in, the address manually I will be now able to access
the page ( even is no operation can be done) but the label status get
updated as logged in , which means that the user is STILL authenticated. How
can ensure that if your are logged out , the Request.IsAuthenticated will be
false!
Please any help willl be appreciated
Frank
I have a standard login.aspx page (UserName\Password). When the user
successully sign in they are redirected to a control panel page
(admin.aspx), which contains a logout button with this code
private void OnLogOutClicked(......)
{
FormsAuthentication.SignOut();
lbStatus.Text= "You have successfully log out";
}
in this same page on PageLoad I have the below code
private void Page_Load(.....)
{
if ( Request.IsAuthenticated = = true ) {...
lbStatus.Text = "User" + User.Identity.Name + "is currenlty logged
in";}
}
The problem is that when the user clicks the "Log Out" button the label
status gets updated(fine) and if the user clicks any other buttons(on the
page) they will be automatically redirect to the login page (fine), which
basically confirm that he\she is logout and no operation can be done on the
page.
Now if I try to type in, the address manually I will be now able to access
the page ( even is no operation can be done) but the label status get
updated as logged in , which means that the user is STILL authenticated. How
can ensure that if your are logged out , the Request.IsAuthenticated will be
false!
Please any help willl be appreciated
Frank