Virtual Happy Hour is canceled this month (March) due to Good Friday.
Try our conversational search powered by Generative AI!
AI OnAI Off
Virtual Happy Hour is canceled this month (March) due to Good Friday.
This is normally the standard .NET functionality if you haven't done anything custom. Kill all cookies and redirect basically. You can normally use:
FormsAuthentication.SignOut(); Session.Abandon(); // clear authentication cookie HttpCookie cookie1 = new HttpCookie(FormsAuthentication.FormsCookieName, ""); cookie1.Expires = DateTime.Now.AddYears(-1); Response.Cookies.Add(cookie1); // clear session cookie (not necessary for your current problem but i would recommend you do it anyway) HttpCookie cookie2 = new HttpCookie("ASP.NET_SessionId", ""); cookie2.Expires = DateTime.Now.AddYears(-1); Response.Cookies.Add(cookie2); FormsAuthentication.RedirectToLoginPage();
when i logout from my episerver edit mode it should automatically get logged out from my public website also and when i logout from my website it should also get loggedout from edit mode.
luckily i have managed to get through 1 of the functionalities.
when i logout from my website i am able to logout from edit mode.
below is the code for the same
if (Request.Cookies[".EPiServerLogin"] != null)
{
var c = new HttpCookie(".EPiServerLogin");
c.Expires = DateTime.Now.AddDays(-1d);
Response.Cookies.Add(c);
}
if i login to edit mode it creates a cookie with name EPiServerLogin. At the time of logout from my website i am deleting EPiServerLogin cookie.
but how can i achieve it if i logout from edit mode it should get logout from my website as well.
comments appreciated