ASP.NET website issues with Windows 8.1/IE 11 browser

試著忘記壹切 提交于 2019-12-04 05:21:57

We're not able here to upgrade to 4.5 across the board, just yet. But I was able to create my own ie.browser browser definition file (for 4.0).

In your project, add to (or create as) App_Browsers/ie.browser, the following:

<!-- Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko -->
<browser id="IE11Preview" parentID="Mozilla">
    <identification>
        <userAgent match="Trident/(?'layoutVersion'\d+).*rv:(?'revision'(?'major'\d+)(\.(?'minor'\d+)?))" />
        <userAgent nonMatch="MSIE" />
    </identification>

    <capabilities>
        <capability name="browser"              value="IE" />
        <capability name="layoutEngine"         value="Trident" />
        <capability name="layoutEngineVersion"  value="${layoutVersion}" />
        <capability name="isColor"              value="true" />
        <capability name="screenBitDepth"       value="8" />
        <capability name="ecmascriptversion"    value="3.0" />
        <capability name="jscriptversion"       value="6.0" />
        <capability name="javascript"           value="true" />
        <capability name="javascriptversion"    value="1.5" />
        <capability name="w3cdomversion"        value="1.0" />
        <capability name="ExchangeOmaSupported" value="true" />
        <capability name="activexcontrols"      value="true" />
        <capability name="backgroundsounds"     value="true" />
        <capability name="cookies"              value="true" />
        <capability name="frames"               value="true" />
        <capability name="javaapplets"          value="true" />
        <capability name="supportsCallback"     value="true" />
        <capability name="supportsFileUpload"   value="true" />
        <capability name="supportsMultilineTextBoxDisplay" value="true" />
        <capability name="supportsMaintainScrollPositionOnPostback" value="true" />
         <capability name="supportsVCard"        value="true" />
        <capability name="supportsXmlHttp"      value="true" />
        <capability name="tables"               value="true" />
        <capability name="supportsAccessKeyAttribute"    value="true" />
        <capability name="tagwriter"            value="System.Web.UI.HtmlTextWriter" />
        <capability name="vbscript"             value="true" />
        <capability name="revmajor"             value="${major}" />
        <capability name="revminor"             value="${minor}" />
    </capabilities>
</browser>

If you're adding to an existing file, look for id="IE10Plus" - you may want to change that to id="IE10" as the "Plus" part is no longer accurate.

If you can go to 4.5 do, but if you can't, this might hold you until you can. Any patches (or upgrades - like to 4.5) will overwrite this - FYI...

Here's the hotfix for ASP.NET 4.0:

http://support.microsoft.com/kb/2836939/en-us

Of course, we are all cracking up about this... amazing that MSft didn't even think to test IE11 against Asp.Net 4.0 before it was released, probably something to do with the fact that marijuana was recently legalized in Washington state.

Setting the browser to IE10 also works (assuming the IE10 hotfix for .NET 4.0 was also installed).

Related change: here is info on the user agent changes in ie11. Hopefully you weren't relying on driving stuff off the user agent string but I believe the ASP.NET uplevel/downlevel logic still uses it in 4.0 and prior (confirmed by setting UA to IE10 against a server with the .net4.0/ie11 issue), but 4.5 supposedly does it differently (see http://www.hanselman.com/blog/IE10AndIE11AndWindows81AndDoPostBack.aspx).

http://msdn.microsoft.com/en-us/library/ie/bg182625(v=vs.85).aspx

Install .NET 4.5 on the server. It overwrites ASP.NET assemblies with newer versions where the known image button click issue is resolved.

We have this also resolved with a hotfix, however installing .NET 4.5 was ultimately accepted as our solution.

In my case the solution was simpler:

  1. Open IE11 on Windows 8
  2. Click Internet Options
  3. Click Security
  4. Go to the Scripting directory (at the end of the list)
  5. Click the Enable radio button on Scripting>Active scripting
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!