volume_up

A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

volume_up

A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

Login and logout programmatically?

Does anyone know how I can login and logout a user through code in EPiServer 5? I'm refering to formsauth. Does EPi use the regular .net functionality for this?

#25094
Oct 13, 2008 15:02

Login: System.Web.Security.FormsAuthentication.SetAuthCookie("username", true/false);

Logout:  System.Web.Security.FormsAuthentication.SignOut();

#25097
Oct 13, 2008 15:15
error This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.