__dopostback_IE10和IE11,Windows 8.1和__doPostBack

__dopostback

__dopostback

A while back there was a bug in the old browser definition files that shipped with .NET 2 and .NET 4. Fast forward to today and these older ASP.NET’s will mis-detect IE10 and IE11. If you have this, you'll see __doPostBack JavaScript errors in your sites when IE10 or IE11 hit them.

不久前,.NET 2和.NET 4附带的旧浏览器定义文件中存在一个错误。快进到今天,这些较旧的ASP.NET将误检测IE10和IE11。 如果您遇到了这种情况,当IE10或IE11遇到它们时,您会在站点中看到__doPostBack JavaScript错误。

However, I'm still getting email from folks who are seeing this, which means they've got very unpatched installations.

但是,我仍然从看到此消息的人们那里收到电子邮件,这意味着他们的补丁程序非常未安装。

Aside: If you don't have this two year old patch, be sure to check out what other updates your server is missing. Again, rollups like .NET 4.5 and "hotfix rollups" get you the latest in one swoop.

另外:如果您没有此两年的旧补丁程序,请确保检查您的服务器缺少哪些其他更新。 再次,.NET 4.5和“修补程序汇总”之类的汇总功能可让您一口气获得最新信息。

Here’s all the internal details for this fix across every combo of framework and OS if you can’t get .NET 4.5. You may want to run "aspnet_regbrowsers -i" after installing the fix if you're having trouble.

如果您无法获得.NET 4.5,则以下是此修复程序在所有框架和操作系统组合中的所有内部详细信息。 如果遇到问题,在安装此修复程序后,可能要运行“ aspnet_regbrowsers -i”。

  • 2836939 .NET 4 - Win7SP1/Win2K3SP2/Win2K8R2SP1/Win2K8SP2/VistaSP2/WinXPSP3

    2836939 .NET 4-Win7SP1 / Win2K3SP2 / Win2K8R2SP1 / Win2K8SP2 / VistaSP2 / WinXPSP3
  • 2836940 .NET 3.5 SP1 - Win2K3SP2/Win2K8SP2/VistaSP2/WinXPSP3

    2836940 .NET 3.5 SP1-Win2K3SP2 / Win2K8SP2 / VistaSP2 / WinXPSP3
  • 2836941 .NET 2.0 SP2 - Win2K3SP2/WinXPSP3

    2836941 .NET 2.0 SP2-Win2K3SP2 / WinXPSP3
  • 2836942 .NET 3.5 SP1 - Win7SP1/Win2K8R2SP1

    2836942 .NET 3.5 SP1-Win7SP1 / Win2K8R2SP1
  • 2836943 .NET 2.0 SP2 - Win7SP1/Win2K8R2SP1

    2836943 .NET 2.0 SP2-Win7SP1 / Win2K8R2SP1
  • 2836945 .NET 2.0 SP2 - Win2K8SP2/VistaSP2

    2836945 .NET 2.0 SP2-Win2K8SP2 / VistaSP2
  • 2836946 .NET 2.0 SP2 - Win8RTM/WinRTRTM/Win2K12RTM

    2836946 .NET 2.0 SP2-Win8RTM / WinRTRTM / Win2K12RTM
  • 2836947 .NET 3.5 SP1 - Win8RTM/WinRTRTM/Win2K12RTM

    2836947 .NET 3.5 SP1-Win8RTM / WinRTRTM / Win2K12RTM

You really shouldn’t be "sniffing" browsers, you should check for the existence of features in your browser. There have been a number "mobile browser" files, including one I used 4 years ago.

您确实不应该“嗅探”浏览器,而应检查浏览器中是否存在功能。 已经有许多“移动浏览器”文件,其中包括我4年前使用的文件。

If you are using a custom browser definition file (and perhaps forgotten about it) you may STILL see a problem with IE10 or IE11 because you've got your own overriding custom browser sniffing regexes in there. Either remove the need for a browser definition file (ideal) or open up your custom file and remote the IE portion.

如果您使用的是自定义浏览器定义文件(并且可能已将其遗忘了),则您可能仍然会看到IE10或IE11的问题,因为您在那里拥有自己的压倒性的自定义浏览器嗅探正则表达式。 不需要浏览器定义文件(理想),或者打开自定义文件并远程访问IE部分。

TL; DR版本 (TL;DR Version)

  • DO - Keep your Web Servers patched.

    请-修补您的Web服务器。
  • DO - Upgrade to ASP.NET 4.5 if you can.

    要做-如果可以,请升级到ASP.NET 4.5。
  • DON'T - Use old Custom Browser Definition Files from years ago and expect them to work

    请勿-使用多年前的自定义浏览器定义文件,并希望它们能正常工作

    DON'T - Use old Custom Browser Definition Files from years ago and expect them to work

    请勿-使用多年前的自定义浏览器定义文件,并希望它们能正常工作

Hope this helps.

希望这可以帮助。

Sponsor: Thanks to Red Gate for sponsoring the feed this week! Check out a simpler way to deploy with Red Gate’s Deployment Manager. It can deploy your .NET apps, services, and databases in a single, repeatable process. Get your free Starter edition now.

赞助者:感谢Red Gate本周赞助了这个提要! 查看使用Red Gate的Deployment Manager进行部署更简单方法。 它可以在一个可重复的过程中部署.NET应用程序,服务和数据库。 立即获取免费的简化版

翻译自: https://www.hanselman.com/blog/ie10-and-ie11-and-windows-81-and-dopostback

__dopostback

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值