logout not logging out?

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();
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top