[英]ASP.NET_SessionId cookie not sent in request from IE browser for intranet site
When accessing an ASP.NET MVC application hosted on intranet from IE, the ASP.NET_SessionId is not sent in the request. 从IE访问Intranet上托管的ASP.NET MVC应用程序时,不会在请求中发送ASP.NET_SessionId。 This occurs on specific test serves.
这发生在特定的测试服务上。 On our development serves hosting the same application, i see that the ASP.NET_SessionId cookie is sent.
在我们的开发中,托管相同的应用程序,我看到发送了ASP.NET_SessionId cookie。
Below is the difference i see form the network trace. 以下是我从网络跟踪中看到的区别。 On the server that not working.
在服务器上无法正常工作。
<entry>
<pageref>1</pageref>
<startedDateTime>2018-05-17T12:01:50.566+00:00</startedDateTime>
<time>188</time>
<request>
<method>GET</method>
<url>http://Server1/Content/Graphics/Cancel16.png</url>
<httpVersion>HTTP/1.1</httpVersion>
<cookies/>
<headers>
The on the server where the session key cookie is passed. 会话密钥cookie传递到的服务器上的。
<entry>
<pageref>0</pageref>
<startedDateTime>2018-05-16T13:31:47.415+05:30</startedDateTime>
<time>31</time>
<request>
<method>GET</method>
<url>http://localhost/site/Content/Graphics/Cancel16.png</url>
<httpVersion>HTTP/1.1</httpVersion>
<cookies>
<cookie>
<name>ASP.NET_SessionId</name>
<value>14zbzcehugb2dvsq0axwo5ud</value>
</cookie>
</cookies>
<headers>
Why would the cookie information not sent on this server. 为什么Cookie信息不会在此服务器上发送。 I have verified the internet option privacy setting and they allow cookies, but what i understand is this affect mainly the internet sites.
我已经验证了Internet选项的隐私设置,并且它们允许使用cookie,但是据我了解,这主要影响Internet网站。
Here you go Arvind. 在这里,你去了Arvind。
Please note, this is just based on an old bug I experienced and might not be relevant to this exact case 请注意,这只是基于我遇到的一个旧错误,可能与这种确切情况无关
My theory was re: something I came across a while ago using MVC3 and IE10/11. 我的理论是关于:我前一段时间使用MVC3和IE10 / 11碰到的东西。
Something to do with .NET not recognising the IE browser signature. 与.NET无关的原因是无法识别IE浏览器签名。
Add an App_Browsers
folder in the root of your site then drop in BrowserFile.browser
containing: 在网站的根目录中添加一个
App_Browsers
文件夹,然后放入BrowserFile.browser
其中包含:
<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>
...and everything works again. ...然后一切又恢复正常。 It was an IE specific issue.
这是IE特有的问题。
Finally the problem was because of having a underscore' ' in the host name setup for the application. 最后,问题是由于在应用程序的主机名设置中带有下划线' '。 The IE, seems to have problem when the host name is set with ' ', the IE prevents sending session cookies.
当主机名设置为“ ”时, IE似乎有问题 ,IE阻止发送会话cookie。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.