IE10用户代理导致ASP.Net不回送设置Cookie(IE10不设置cookie) [英] IE10 User-Agent causes ASP.Net to not send back Set-Cookie (IE10 not setting cookies)

查看:149
本文介绍了IE10用户代理导致ASP.Net不回送设置Cookie(IE10不设置cookie)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

摘要

使用时,使用IE 10,这意味着,例如,你不能登录到使用IE10一个ASP.Net网站的时候ASP.Net不会发回一个设置Cookie 头窗体身份验证,例如

详细信息

我们目前正在测试我们对IE 10 [preVIEW 2]遗留Web应用程序之一。

在尝试使用窗体身份验证登录,我们不响应得到了设置Cookie 头,如果用户代理是IE 10.我们的'已经试过这一个空白的.Net 2和.Net 4个网站。

由于我们不能/不会相信的,我们甚至通过手动远程登录跑后续HTTP请求 - 使用所有常用的工具之后 - 而得到了相同的答复

  GET http://test.ourdomain.co.uk/ HTTP / 1.1
接受:* / *
主持人:test.ourdomain.co.uk
用户代理:Mozilla的/ 5.0(兼容; MSIE 10.0; Windows NT的6.1;三叉戟/ 6.0)
内容长度:0

以上HTTP请求的响应返回任何设置Cookie 。然而,如果我们简单地将用户代理改为的Mozilla / 5.0(兼容; MSIE 9.0; Windows NT的6.1;三叉戟/ 6.0)!它的工作原理

能否别人复制呢?我无法找到比效果非标准URL模式问题等IE10饼干任何已知问题。

修复

devio 后贴在原来的答复,有一种变通方法,的 nullptr 已经确认,现在有这个一个修补程序。

http://support.microsoft.com/kb/2600088

我已经推动了hotfix的主要问题,因为它只是供将来参考更加便利,但请不要了,投中提到的用户。


解决方案

上找到<一此条href=\"http://connect.microsoft.com/VisualStudio/feedback/details/662275/asp-net-user-agent-sniffing-and-ie10-internet-explorer-10\">MS连接,行为是公认的bug。

建议的解决方法(从入门):


  

== ==解决方法


  
  

在此期间,使之工作,并避免在类似问题
  今后,我用一个文件〜\\ App_Browsers文件\\ BrowserFile.browser与
  以下内容:


 &LT;&浏览器GT;
&LT;浏览器REFID =默认&GT;
&LT;功能及GT;&LT;! - 为了避免错误例如检测IE10 - &GT;
&LT;功能名=曲奇值=真/&GT;
&LT;功能名=ecmascriptversionVALUE =3.0/&GT;
&LT; /能力和GT;
&LT; /浏览器&GT;
&LT; /浏览器&GT;

Summary

ASP.Net does not send back a Set-Cookie header when using IE 10. Meaning that for example you cannot login to an ASP.Net site using IE10 when using Forms Authentication for example.

Detail

We're currently testing one of our legacy web apps against IE 10 [Preview 2].

When attempting to login using Forms Authentication, we don't get a Set-Cookie header in the response if the user-agent is that of IE 10. We've tried this with a blank .Net 2 and .Net 4 site.

Because we couldn't/wouldn't believe it, we even ran the follow HTTP request manually through telnet - after using all usual tools - and got the same response.

GET http://test.ourdomain.co.uk/ HTTP/1.1
Accept: */*
Host: test.ourdomain.co.uk
User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)
Content-Length: 0

The above HTTP request returns no Set-Cookie in the response. Yet if we simply change the User-Agent to Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/6.0) it works!

Can anyone else replicate this? I can't find any known issue with IE10 cookies other than an issue that effects non-standard URL patterns.

Hotfix

After devio posted the original answer, with a workaround, nullptr has confirm that there is now a hotfix for this.

http://support.microsoft.com/kb/2600088

I've promoted the hotfix to the main question as it's just handier for future reference, but please do up-vote the users mentioned.

解决方案

Found this entry on MS Connect, the behavior is a recognized bug.

Suggested Workaround (from the entry):

== Workaround ==

In the meantime to make it work and to avoid similar issues in the future, I use a file ~\App_Browsers\BrowserFile.browser with the following:

<browsers>
<browser refID="Default">
<capabilities><!-- To avoid wrong detections of e.g. IE10 -->
<capability name="cookies" value="true" />
<capability name="ecmascriptversion" value="3.0" />
</capabilities>
</browser>
</browsers>

这篇关于IE10用户代理导致ASP.Net不回送设置Cookie(IE10不设置cookie)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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