Unable to logout from ASP.NET MVC application using FormsAuthentication.SignOut()

前端 未结 4 1503
心在旅途
心在旅途 2021-01-14 02:56

I am trying to implement Logout Functionality in ASP.NET MVC.

I use Forms Authentication for my project.

This is my Logout code:

FormsAuthen         


        
4条回答
  •  难免孤独
    2021-01-14 03:51

    That's strange... I make one single call to: FormsAuthentication.SignOut(); and it works...

    public ActionResult Logout() {
      FormsAuthentication.SignOut();
      return Redirect("~/");
    }
    

提交回复
热议问题