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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top