G
Guest
if a user requests a page they aren't authorized to view (based on role) I
redirect them to a NotAuthorized.aspx page. The page is based on a master
page with a LoginStatus control.
When the user is transfered to this NotAuthorized page I log them off in
Page_Init
but the LoginStatus still shows the loggedin template, not the anonymous
template.
Should I be doing this signout on a different event?
protected void Page_Init( object sender, EventArgs e ) {
if ( Request.IsAuthenticated ) {
FormsAuthentication.SignOut();
}
}
redirect them to a NotAuthorized.aspx page. The page is based on a master
page with a LoginStatus control.
When the user is transfered to this NotAuthorized page I log them off in
Page_Init
but the LoginStatus still shows the loggedin template, not the anonymous
template.
Should I be doing this signout on a different event?
protected void Page_Init( object sender, EventArgs e ) {
if ( Request.IsAuthenticated ) {
FormsAuthentication.SignOut();
}
}