Jan 28 2010
ASP.NET FormsAuthentication – Logout
ASP.NET FormsAuthentication – Logout
protected void LoggedOut(object sender, EventArgs e)
{
FormsAuthentication.SignOut();
HttpCookie authCookie = Context.Response.Cookies.Get(FormsAuthentication.FormsCookieName);
if (authCookie != null)
authCookie.Expires = DateTime.Now.AddYears(-1);
Session.Abandon();
Response.Redirect("~/default.aspx", true);
}

