Logout MVC3 C# application with Windows Authentica

2019-08-08 09:40发布

问题:

I have made an mvc3 application with Windows Authentication. Everything works fine but I can't seem to find a way to log-out. I have read that I have to use forms Authentication with AD impersonation, because I still want to access the guid from the ad. Has anyone else found a different method to do this.

回答1:

There is a Javascript solution in order to do this. Otherwise, I'm not sure that it can be done without impersonation or use the FormsAuthentication option.



回答2:

You won't be able to logout because the Kerberos authentication will persist for all pages. A solution would be to use Forms Authentication. Then you could easily call:

FormsAuthentication.SignOut();

Is this what you're looking for?