__dopostback_IE10和IE11,Windows 8.1和__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错误。
- This whole concept has been long-fixed in ASP.NET 4.5. If you have a .NET 4 app you put .NET 4.5 on it and you're set. We don't sniff like this anymore. 整个概念在ASP.NET 4.5中已得到长期解决。 如果您有.NET 4应用程序,则将.NET 4.5放到上面,即可进行设置。 我们不再像这样嗅探。
-
Two years ago there was a backward-fix to all versions of ASP.NET on all OSs including .NET 2, 3, and 4.
两年前,在所有操作系统(包括.NET 2、3和4)上都对所有版本的ASP.NET进行了向后修复。
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
请勿-使用多年前的旧自定义浏览器定义文件,并希望它们能正常工作
-
DO - Get newer files from http://51degrees.mobi
要做-从http://51degrees.mobi获取较新的文件
- DO - (Last resort) Edit your custom files to remove IE要做-(最后手段)编辑自定义文件以删除IE
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应用程序,服务和数据库。 立即获取免费的简化版。
关于斯科特 (About Scott)
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
斯科特·汉塞尔曼(Scott Hanselman)是前教授,前金融首席架构师,现在是演讲者,顾问,父亲,糖尿病患者和Microsoft员工。 他是一位失败的单口相声漫画家,一个玉米种植者和一本书的作者。
翻译自: https://www.hanselman.com/blog/ie10-and-ie11-and-windows-81-and-dopostback
__dopostback