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,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top