Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

We have ASP.NET application, currently we are doing compatibility testing for this on Windows 8.1/IE 11. Found some issues related to UI alignment, _dopostback and imagebutton click. Previously faced the same issues with Windows 8/IE 10 as well. Those issues are addressed by adding IE browser file in app_browser folder in the project. But we have not found any ie.browser latest file for IE 11 support. From some of the blogs came to know hot fixes are there to resolve this issues.Tried by installing hot fixes in hosted machine, _dopostback and UI alignment issues got resolved. Image button click still not working.

like image 411
Balu Reddy Kovvuri Avatar asked Aug 30 '13 06:08

Balu Reddy Kovvuri


3 Answers

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...

like image 194
Michael Avatar answered Nov 07 '22 13:11

Michael


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

like image 29
nothingisnecessary Avatar answered Nov 07 '22 12:11

nothingisnecessary


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.

like image 31
Wiktor Zychla Avatar answered Nov 07 '22 11:11

Wiktor Zychla