ASP.Net MVC 5 w/identity 2.2.0 Log off not working

后端 未结 3 970
不知归路
不知归路 2020-12-28 14:14

I am using a the basic login on a test ASP.Net MVC 5 site (for an internet site).

The login works fine but when I try to logout it doesn\'t happen. The logout link

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-28 14:31

    I had this problem before, change:

    AuthenticationManager.SignOut();
    

    To:

    AuthenticationManager.SignOut(DefaultAuthenticationTypes.ApplicationCookie);
    

    Assuming that you are using ApplicationCookie to store your login information.

提交回复
热议问题