// Delete the user details from cache.
    session.Abandon();
// Delete the authentication ticket and sign out.
    FormsAuthentication.SignOut();
// Clear authentication cookie.
    HttpCookie cooke = new HttpCookie(FormsAuthentication.FormsCookieName, "");
    cooke.Expires = DateTime.Now.AddYears(-1);
    response.Cookies.Add(cookie);
Your Answer
Sign In
Enter email and password to comment or answer
Not the answer you are looking for? Browse other questions tagged or ask your own question.