简体   繁体   English

Windows 7中的ASP.NET Project和IE10兼容模式问题

[英]ASP.NET Project and IE10 Compatibility Mode issues in Windows 7

I have an asp.net website that is used by many clients just fine. 我有一个asp.net网站,很多客户都可以使用它。 I recently had a customer who switched to Win7 and IE10. 我最近有一个客户切换到Win7和IE10。 He tells me that whenever he tries to view my site that he is prompted for compatibility mode. 他告诉我,每当他试图查看我的网站时,系统都会提示他提供兼容模式。 I attempted to reproduce this in my lab on several Win7 boxes with IE10. 我尝试在我的实验室中使用IE10在几个Win7盒子上重现这个。 No luck. 没运气。

So I have a few questions: 所以我有几个问题:

  • Has anyone seen IE10 on Win7 selectively prompt for compatibility mode? 有没有人在Win7上看到IE10有选择地提示兼容模式?
  • What are the disadvantages of just configuring his browser to always use compatibility mode? 仅将其浏览器配置为始终使用兼容模式有什么缺点?

Thanks. 谢谢。

This happens pretty often, not only about IE 10, but also to IE 9. As for me, it's better to run away from compatibility mode, as it often breaks your page look and functionality. 这种情况经常发生,不仅仅是IE 10,还有IE 9.至于我,最好远离兼容模式,因为它经常会破坏你的页面外观和功能。

Good solutions for this - use web.config of your site: 很好的解决方案 - 使用您网站的web.config:

<httpProtocol>
<customHeaders>
<clear />
<add name="X-UA-Compatible" value="IE=edge" />
</customHeaders>
</httpProtocol>

(used it in web.forms project). (在web.forms项目中使用它)。

Or global.asax 或者global.asax

protected void Application_BeginRequest()
{
    Response.AddHeader("X-UA-Compatible", "IE=edge");
}

(used it in one of my MVC projects). (在我的一个MVC项目中使用它)。

And here is good reply about compatibility mode: 以下是关于兼容模式的好回复:

Why does IE9 switch to compatibility mode on my website? 为什么IE9会在我的网站上切换到兼容模式?

If you are attempting to reproduce the error with a deployment within your intranet IE might default your settings (I assume the user is not on the same intranet as your deployment). 如果您尝试通过Intranet IE中的部署重现该错误,则可能会默认设置(我假设用户与您的部署不在同一Intranet上)。 You can reach the settings for this in IE (press Alt+T for the Tools menu) Tools>Compatibility View Settings. 您可以在IE中达到此设置(按Alt + T进入工具菜单)工具>兼容性视图设置。

This has helped me in the past for such problems, although I would be delighted to see others' answers too. 这有助于我解决这些问题,尽管我也很高兴看到别人的答案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 IE10和Windows 8以及ASP.NET MVC(IIS 7) - IE10 and Windows 8 and ASP.NET MVC (IIS 7) 在IE10 + Win7中,ASP.NET ImageButton仅在兼容模式下有效 - In IE10+Win7 a ASP.NET ImageButton only works in Compatibility Mode ASP.NET忽略Web.config中的IE7兼容模式标记 - ASP.NET Ignores IE7 Compatibility Mode Tag in Web.config IE11 / IE10兼容性视图-导航错误 - IE11/IE10 Compatibility View - Navigation Error IE 7浏览器(asp.net网站)的兼容性问题 - Compatibility issue with IE 7 browser (asp.net website) ASP.NET兼容模式下的WCF和字符集编码 - WCF in ASP.NET compatibility mode and charset encoding 禁止ASP.NET网站的IE兼容性视图 - Prohibit IE Compatibility View for an ASP.NET website ASP.NET UpdatePanel 在 Windows 10 上的 IE11 中的部分回发上闪烁,当它具有可滚动的 div 时 - ASP.NET UpdatePanel flickers on partial postbacks in IE11 on Windows 10, when it has scrollable div 在VS 2015的Windows 10安装上无法以64位模式运行ASP.NET项目 - Unable to run ASP.NET projects in 64 bit mode on Windows 10 install with VS 2015 使JavaScript onClientClick事件在IE10中运行时遇到问题 - Having issues getting JavaScript onClientClick event working in IE10
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM