IE 10 Redirect URL Is Broken

2019-08-05 11:50发布

问题:

I work on a website that works fine in Chrome, Firefox, Opera, and IE < 10. But in IE 10 on Win 8, after logging in, I get redirected to:

https://domain.com/(F(HWiLasqNvX0ANW4jLyE6n7Ey3U_mOFxXksL-oU95Z-wf3xQ-FGD8_szv-cuhNpoDD8cKM3SBX_PCipYO1ivV03YpPzouc8wJTe6Y2JAsUdyv_Nf76LLu0dlzcsRVSGJF0))/path/

When in all other browsers I get:

https://domain.com/path/

Why does IE insert that giant frackin string in the URL? More details:

  • The site an ASP.NET MVC 4 site
  • Hosted in IIS 7.5
  • Hosted on Windows Server 2008
  • Using forms authentication
  • After login screen, am redirecting to the above location.

回答1:

Apply the Hotfix

By default, ASP.NET uses sniffing technology for the user agent string to detect browsers. The browser definition files cover a certain range of browser versions. However, as the version numbers increase, ASP.NET might not recognize new versions of a browser by using the user agent string. In this case, ASP.NET might handle these versions as an unknown browser. For example, ASP.NET cannot recognize Windows Internet Explorer 10 that has the following user agent string:

Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)


回答2:

look likes it is problem with user agent detection. This issue is well described by SCOTT HANSELMAN. http://www.hanselman.com/blog/BugAndFixASPNETFailsToDetectIE10CausingDoPostBackIsUndefinedJavaScriptErrorOrMaintainFF5ScrollbarPosition.aspx