当点击指向新标签页的链接时(首次请求时),IE11不发送会话Cookie [英] IE11 does not send session cookie when a link targeting a new tab is clicked (on first request)

查看:361
本文介绍了当点击指向新标签页的链接时(首次请求时),IE11不发送会话Cookie的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从IE11打开初始新标签页(target _blank)时,我遇到了一些麻烦。

I am having some trouble holding onto session when opening an initial new tab (target _blank) from IE11.

当我关闭IE11的所有实例,然后打开一个新的浏览器并导航到测试网页(default.aspx)时,页面在会话中存储一个值,并显示会话ID在页面上。如果我刷新页面,会话ID保持不变。该页面具有指向自身(default.aspx)的目标为_blank的链接。如果我单击此链接,将打开一个新选项卡,但会话ID不同。如果我刷新原始窗口,会话ID现在匹配新窗口。

When I close all instances of IE11 and then open a fresh browser and navigate to the test webpage (default.aspx) the page stores a value in session and displays the session ID on the page. If I refresh the page the session ID stays the same. The page has a link to itself (default.aspx) with a target of _blank. If I click this link a new tab is opened, but the session ID is different. If I then refresh the original window the session ID now matches the new window.

<%@ Page Language="C#" AutoEventWireup="true" Inherits="System.Web.UI.Page" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
<% Session["StoredValue"]="Test"; %>

<div>SessionID: <%=Session.SessionID%></div>

<a href="/default.aspx" target="_blank">New Window</a>
<a href="http://www.google.com" target="_blank">3rd Party Window</a>

</body>
</html>

看来这个问题只出现在同一个域上的第一个窗口已经验证了这两个target =_ blank的问题,并通过在点击链接时按住CTRL)。

It appears this problem only occurs for the first window on the same domain opened in a new tab (I have verified the problem with both target="_blank" and by holding CTRL while clicking the link).


  • Fiddler我可以看到
    会话cookie在
    default.aspx的初始请求中正常发送。当我点击链接以在新标签页
    中打开网页时,会话Cookie未在请求标头中发送。

  • 如果我重新启动浏览器,请转到测试页面,手动打开一个新的标签
    ,并将链接目标粘贴到cookie中,在请求标头中正确地发送cookie
    ,并且新标签中的会话
    与原始标签符合预期。 / li>
  • 如果我重新启动浏览器,请转到测试页,从测试页面中的
    链接定位_blank打开google,然后单击链接
    打开测试页面在新选项卡中,cookie也会正确发送
    在请求标头中,来自新窗口的会话与预期的
    原始窗口相匹配。

我相信这是一个客户端问题,但网站是从安装了.NET 4.51的4.0集成网站中的Windows Server Standard 2008 R2 SP 1运行的(也尝试只安装4.5)

I believe this to be a client side issue but the site is running from Windows Server Standard 2008 R2 SP 1 in a 4.0 Integrated website with .NET 4.51 installed (also tried with only 4.5 installed).

客户端是Windows 7 64位运行IE11(11.0.9600.16476)。我已经验证了从IE11运行Windows 7的其他机器上的问题,并确认它不是在IE10从Windows 8在桌面模式下的问题。一切正常。

The client is Windows 7 64-bit running IE11 (11.0.9600.16476). I have verified the problem on other machines running Windows 7 from IE11 and confirmed that it is not a problem in IE10 from Windows 8 in desktop mode. Everything works as expected in Chrome and Firefox.

我已验证问题仍然存在,即使我:

I have verified the problem persists even if I:


  • 将安全性从中高中移至中

  • 停用保护模式

  • 更改隐私权以接受所有Cookie

  • 将网站添加到本地内部网或受信任的网站区域网站列表

  • 在响应标头中设置P3P紧凑型隐私政策,说明未收集或使用任何信息。 li>
  • 在响应标头中设置P3P紧凑型隐私权政策,通常会在IE的以前版本中的iframe中允许第三方Cookie。

  • 更改网站ASP.NET会话状态设置为cookieless =UseCookies或false或完全删除该属性(ASP.NET状态服务器)。

  • Move security from Medium High to Medium
  • Disable Protected Mode
  • Change privacy to Accept all Cookies
  • Add the site to either the Local Intranet or Trusted Sites zone website list
  • Set a P3P compact privacy policy in the response headers stating no information is collected or used.
  • Set a P3P compact privacy policy in the response headers that would typically be accepted to allow 3rd party cookies within an iframe in past versions of IE.
  • Change the website ASP.NET session state settings to cookieless="UseCookies" or "false" or remove the attribute altogether (ASP.NET State Server).

任何想法?有没有人看到这个问题或类似的?

Any ideas? Has anyone else seen this issue or similar?

推荐答案

这是一个活动的错误根据微软。显然没有服务器端的方法来解决这个问题。

This is an active bug according to microsoft. There is apparently no server-side way to fix this.

链接到错误报告

这篇关于当点击指向新标签页的链接时(首次请求时),IE11不发送会话Cookie的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆