1

在 win 7 和 win 8 上,我的登录仅在 IE 10 中停止工作。其余浏览器表现正常。win 7 上的 IE 9 也可以正常工作。

这就是我们在网站的 mvc 部分所拥有的。ajax 确认返回到页面,然后重定向到仪表板页面。由于仪表板页面落后于登录,因此用户被重定向回登录页面。

public void SignInUser(UserInfo user)
        {
            FormsAuthentication.SignOut();
            SessionService.AbandonSession();
            FormsAuthentication.SetAuthCookie(user.UserId, false);
            //here we put the user in session
            //here we log hit
        }

这就是我们在 Kentico CMS 方面所拥有的,经典的 asp.net。这是一个网络服务请求,登录代码执行,然后确认返回到页面,该页面又重定向到仪表板页面。同样的事情也发生在这里。用户被重定向回登录页面。

FormsAuthentication.SignOut();
                    FormsAuthentication.SetAuthCookie(user.UserId, false);

有没有其他人在他们的网站上看到过这种行为?

4

3 回答 3

5

此问题有一个修补程序,其中使用 IE 10 时不发回 Set-Cookie 标头。

这也在Connect上,如果您无法应用此修补程序,则在连接线程中提到了一种解决方法。

于 2012-11-29T19:36:17.150 回答
1

只需安装.net framework 4.5,它将解决您面临的大部分问题IE10 & IE11.net framework 4.5高度兼容framework 4.0并解决IE9, IE10 and IE11. 您不需要将应用程序框架定位到 4.5,将其保留为 4.0 构建配置。

于 2014-01-07T15:18:11.933 回答
0

此问题通常是由于 Internet Explorer 版本的缓存问题引起的。您只需Application_BeginRequest()global.asax文件中写入以下代码。

protected void Application_BeginRequest()
{
    Response.Cache.SetCacheability(HttpCacheability.NoCache);
    Response.Cache.SetExpires(DateTime.Now.AddSeconds(-1));
    Response.Cache.SetNoStore();
}
于 2014-02-25T05:51:34.430 回答