Asp.net mvc Internet站点的IE浏览器请求中未发送ASP.NET_会话ID cookie

Asp.net mvc Internet站点的IE浏览器请求中未发送ASP.NET_会话ID cookie,asp.net-mvc,session,internet-explorer,cookies,Asp.net Mvc,Session,Internet Explorer,Cookies,从IE访问托管在intranet上的ASP.NET MVC应用程序时,请求中不会发送ASP.NET_会话ID。这发生在特定的测试服务上。在托管相同应用程序的开发服务中,我看到ASP.NET_SessionId cookie被发送 下面是我从网络跟踪中看到的差异。 在无法工作的服务器上 <entry> <pageref>1</pageref> <startedDateTime>2018-05-17T12:01:50.5

从IE访问托管在intranet上的ASP.NET MVC应用程序时,请求中不会发送ASP.NET_会话ID。这发生在特定的测试服务上。在托管相同应用程序的开发服务中,我看到ASP.NET_SessionId cookie被发送

下面是我从网络跟踪中看到的差异。 在无法工作的服务器上

<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>

1.
2018-05-17T12:01:50.566+00:00
188
收到
http://Server1/Content/Graphics/Cancel16.png
HTTP/1.1
在传递会话密钥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>

0
2018-05-16T13:31:47.415+05:30
31
收到
http://localhost/site/Content/Graphics/Cancel16.png
HTTP/1.1
ASP.NET_会话ID
14zbzcehugb2dvsq0axwo5ud
为什么cookie信息不会发送到此服务器上。我已经验证了internet选项隐私设置,他们允许Cookie,但据我所知,这主要影响到internet站点。

这里是Arvind

请注意,这只是基于我经历的一个老错误,可能与这个确切的案例无关

我的理论是re:这是我不久前使用MVC3和IE10/11时遇到的

与.NET无法识别IE浏览器签名有关

在站点的根目录中添加一个
App\u Browsers
文件夹,然后放入
browser.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>


…一切又恢复正常了。这是一个IE特有的问题

最后,问题是因为应用程序的主机名设置中有下划线“”。当主机名设置为“”时,IE似乎有问题,IE阻止发送会话cookie


在IE中,您是否看到您的URL随着添加的会话ID而改变?另外-您使用的是哪个版本的MVC和IE?@scgough会话Id没有在URL中传递,我们使用的是MVC 5.0和IE 11,.net framework是4.5.2OK-没问题。这不是我当时所想的:)@scgough请告诉我您在使用具有会话ID的URL时在想什么,在我的情况下,该URL正在使用dev服务器上的会话ID进行更改。但是在有问题的服务器上,它并没有被改变,请看下面