Asp.net mvc 5 MVC 5应用程序中的WSFederation注销未删除Internet Explorer中的身份验证cookie

Asp.net mvc 5 MVC 5应用程序中的WSFederation注销未删除Internet Explorer中的身份验证cookie,asp.net-mvc-5,claims-based-identity,ws-federation,Asp.net Mvc 5,Claims Based Identity,Ws Federation,我正在使用WSFederation身份验证开发一个MVC5应用程序。当用户注销时,我使用以下代码: FederatedAuthentication.SessionAuthenticationModule.SignOut(); issuer = FederatedAuthentication.WSFederationAuthenticationModule.Issuer; reply = FederatedAuthentication.WSFederationAuthenticationModul

我正在使用WSFederation身份验证开发一个MVC5应用程序。当用户注销时,我使用以下代码:

FederatedAuthentication.SessionAuthenticationModule.SignOut();
issuer = FederatedAuthentication.WSFederationAuthenticationModule.Issuer;
reply = FederatedAuthentication.WSFederationAuthenticationModule.Realm;
signOutRequestMessage = new SignOutRequestMessage(new Uri(issuer), reply);
然后我重定向到“signOutRequestMessage”

这在Chrome中工作。注销后,如果导航回受保护的页面,浏览器会提示进行身份验证。但是,这种行为在Internet Explorer 9中不会发生。IE只是很高兴地让用户进入页面

我还尝试调用FederatedAuthentication.SessionAuthenticationModule.FederatedSignOut(),但没有任何区别

我尝试从响应对象中删除FedAuth和FedAuth1 cookies,但仍然没有区别


非常感谢您的帮助。

请尝试将Cookie过期日期设置为过去

foreach (string key in Request.Cookies.AllKeys)
{
    HttpCookie cookie = new HttpCookie(key)
    {
        Expires = DateTime.UtcNow.AddDays(-7),
        Secure = true,
        HttpOnly = true
    };
    Response.Cookies.Add(cookie);
}  


@tereško我现在在使用.net core ws federation时遇到了同样的问题,您解决了这个问题吗?如果是,你能告诉我你是怎么解决的吗。