IE11上的ASP.NET网站兼容性问题 [英] ASP.NET Website Compatability issue on IE11
问题描述
我有一个用ASP.NET开发的网站,该网站在Chrome,Firefox浏览器上工作正常,但在IE上却不能.它要求在浏览器中专门设置兼容性.如果我们取消兼容性,则该网站将无用.
I have a Website developed in ASP.NET which works fine in Chrome, Firefox browsers but not IE. It requires the Compatability to be set specifically in the browser. If we remove the compatability, the website is rendered useless.
除了放入像:<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
推荐答案
您很可能在/App_Browsers
中具有mobile.browser
文件.
Most likely you have mobile.browser
file in /App_Browsers
.
问题在于,mobile.browser文件没有IE 11的条目,因此它不知道如何处理它,并且默认情况下它将发送带有application/xhtml+xml
标头的响应.
The problem is that the mobile.browser file does not have an entry for IE 11 so it doesn't know how to treat it and by default it will send the response with an application/xhtml+xml
header.
两种解决方案:
- 删除mobile.browser文件
- 将mobile.browser文件更新为具有IE 11条目的最新版本
这是一篇解释我的问题的文章: IE 11中的HTML不完整
Here is a write-up explaining my problem: Incomplete HTML in IE 11
这篇关于IE11上的ASP.NET网站兼容性问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!