Technical support This forum is closed.
Version 1.x > Technical support > Clear Session Variables on SignOut View modes: 
User avatar
Guest
norashlea - 4/4/2006 5:10:46 AM
   
Clear Session Variables on SignOut
Hello again,

I have two different secure areas on my site. One "secure" login should be able to access both areas, but the other "secure" login should access only it's own area. So I created a Role that that the double-secure-area logins will be assigned to. On authentication, if the UserID belongs to this Role, I set a session variable, and then test for its existence on Page_Load of the Master page for this section.

The problem is, if one of the double-secure-area logins has been logged in (ie, the Role session variable is created), and then logs out, and then a single-secure-area user logs in during the same session, the Role session variable still exists so they get access to the area!!

How can I clear all session variables with OnClick of the SignOutButton?

Thanks,
Sharon.

User avatar
Guest
admin - 4/5/2006 1:26:19 PM
   
Re: Clear Session Variables on SignOut
Hi Sharon,

you need to handle the SignOutButton.BeforeSignOut event and clear the session variable value here.

Best Regards,

User avatar
Guest
norashlea - 4/5/2006 1:40:35 PM
   
Re: Clear Session Variables on SignOut
Hi Petr,

Thanks for both answers (this, and my other "Redirect After Signout"). I've covered both issues with the one re-direct -- to a "SignoutRedirect.aspx", that clears session variables, and then redirects back to the logon page.

I couldn't figure out how to access the SignOutButton.BeforeSignout event, and had already added the Session.Clear(); to the SignoutRedirect.aspx when I got the email notification of this reply -- and it works, so this is fine.

Thanks,
Sharon.