Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Forms Signout With EPiServer

Vote:
 

Hi all,

 

I have a logout button in one of my templates with the following code:

 

Session.Abandon();

 

Response.Cookies.Clear(); 

FormsAuthentication.SignOut();

However, when I check the HTTPContext.Current.User property after calling this code, I see that the user is still authenticated.

Am I missing something here? Once the user logs out, I would like all information held on the user to be cleared.

Thank you

 

 

 

 

 

 

 

 

#49583
Mar 23, 2011 19:08
Vote:
 

The easy way around the problem is to redirect after running that code. You will still have Request.Cookies and possibly other authentication-related stuff lying around in the request you're in that you might not be able to clear.

#49585
Mar 23, 2011 22:53
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.