Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-mvc/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net mvc 在Internet Explorer中访问时,ASP.NET应用程序中的HttpContext.Current.Session为空_Asp.net Mvc - Fatal编程技术网

Asp.net mvc 在Internet Explorer中访问时,ASP.NET应用程序中的HttpContext.Current.Session为空

Asp.net mvc 在Internet Explorer中访问时,ASP.NET应用程序中的HttpContext.Current.Session为空,asp.net-mvc,Asp.net Mvc,工作: ASP.NET应用程序托管在IIS 8.5上 在绑定中,我们向网站提供了域名 当我们尝试使用域名访问网站时,HttpContext.Current.seision会在任何版本的Internet Explorer上引发空引用异常 但同样的应用程序在Chrome和Firefox上运行良好 此外,它在没有域名的Internet Explorer中也可以正常工作,即使用IP 将中的sessionstate属性cookieless设置为AutoDetect或trueweb.config可以解决此问

工作:

ASP.NET应用程序托管在IIS 8.5上

在绑定中,我们向网站提供了域名

当我们尝试使用域名访问网站时,HttpContext.Current.seision会在任何版本的Internet Explorer上引发空引用异常

但同样的应用程序在Chrome和Firefox上运行良好

此外,它在没有域名的Internet Explorer中也可以正常工作,即使用IP

将中的sessionstate属性cookieless设置为AutoDetect或trueweb.config可以解决此问题,但在URL中可以看到具有某些ID的cookie,这是我们希望避免的

如果我们缺少IIS上的任何设置或其他方式,请任何人提供帮助。

找到解决方案:

删除URL名称(即DNS名称)中的下划线

参考链接: 找到的解决方案:

删除URL名称(即DNS名称)中的下划线

参考链接:

Internet Explorer是否配置为允许Cookie?我想这篇文章可能会帮助您@Mason我们允许Cookie。@Aderbal感谢您在URL中用下划线回复。从URL中删除下划线修复了该问题。Internet Explorer是否配置为允许Cookie?我想这篇文章可能会帮助您@Mason我们允许Cookie。@Aderbal感谢您用URL中的下划线回复。从URL中删除下划线修复了该问题。