Swati Agarwal
How do you sign out from forms authentication?
By Swati Agarwal in .NET on Mar 29 2014
  • Shiv Ratan Kumar
    Jun, 2019 3

    [Authorize] public ActionResult Logoff() {FormsAuthentication.SignOut(); Session.Abandon();return RedirectToAction("Index", "Home"); }

    • 1
  • Munesh Sharma
    Apr, 2014 4

    FormsAuthentication.SignOut(); this method is used for sign out from forms authentication.

    • 0
  • Dileep Kumar Patel
    Apr, 2014 2

    protected void btnLogout_Click(object sender, EventArgs e){try{Response.Cache.SetCacheability(HttpCacheability.NoCache);Response.Cache.SetNoStore();Response.Cookies.Clear();Session.Abandon();//HttpContext.Current.Session["ownerpanel"] = null;//HttpContext.Current.Session.Abandon();FormsAuthentication.SignOut();FormsAuthentication.RedirectToLoginPage();}catch { }}

    • 0
  • Swati Agarwal
    Mar, 2014 29

    The FormsAuthentication.Signout() method is used to sign out from the forms authentication.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS