【问题标题】:Internet Explorer not writing cookies when setting 'remember me'设置“记住我”时 Internet Explorer 不写入 cookie
【发布时间】:2015-02-05 15:45:43
【问题描述】:

在我们的软件中,我们有一个 asp:login 控件,如下所示:

                    <asp:Login ID="LoginControl"
                    ToolTip="" runat="server" MembershipProvider=<MembershipProvider>
                    UserNameLabelText="Username:" BackColor="White" BorderColor="#E7E8E9"
                    BorderWidth="0px" BorderStyle="Solid" Font-Names="Arial,Sans-Serif"
                    Width="220px" LoginButtonText="Login" 
                    TitleText="" onloggedin="LoginControl_LoggedIn" PasswordRecoveryText="Forgot your password?"
                    PasswordRecoveryUrl="/PasswordRecovery.aspx" 
                    meta:resourcekey="LoginControlResource1">
                    <LabelStyle HorizontalAlign="Right" />
                    <TextBoxStyle BorderColor="#E7E8E9" BorderStyle="Solid" BorderWidth="1px" 
                        CssClass="TextBoxStyle" Width="140px" />
                </asp:Login>

它似乎没有说要显示“记住我”,但默认情况下会显示。

问题如下:

  1. 登录到我们网络之外的域: 使用 Internet Explorer 并单击记住我时,Web 应用程序不会重定向,而是重新加载登录页面。我将 fiddler 附加到它,发现它没有向任何 cookie 写入任何内容。

  2. 登录到我们网络上的域: 使用 Internet Explorer 并单击记住我时,Web 应用程序将用户定向到预期的欢迎页面。 Fiddler 还展示了写入 cookie。

我在 IE 上设置了隐私以允许所有 cookie 仍然没有运气。这种行为在 chrome 或 firefox 上不存在,它们都可以正常工作。这个问题也存在于所有版本的 IE,确切地说是 8、9、10。

我们的应用程序不会操纵或覆盖 .net 在其框架中已经提供的任何 cookie 或身份验证行为。

有谁知道为什么 IE 不会写入我们网络之外的域的 cookie,而是正确地写入我们网络中的域?

【问题讨论】:

    标签: asp.net internet-explorer cookies


    【解决方案1】:

    检查工具-> Internet 选项-> 安全-> Internet 和本地 Intranet 区域的自定义级别。

    它包含用户身份验证设置,默认情况下,本地 Intranet 设置为自动登录。尝试为 Internet 配置相同的设置。

    了解您可以通过 GPO 配置 IE 安全区域可能很有用

    http://blogs.msdn.com/b/askie/archive/2012/06/05/how-to-configure-internet-explorer-security-zone-sites-using-group-polices.aspx

    【讨论】:

      猜你喜欢
      • 2014-04-20
      • 2020-05-17
      • 1970-01-01
      • 2012-01-02
      • 1970-01-01
      • 2014-05-06
      • 2013-03-23
      • 2012-03-23
      • 1970-01-01
      相关资源
      最近更新 更多