How to get your ASP.NET application working in IE11

Thursday, December 19, 2013

Let me guess – you just updated to Internet Explorer 11 and found that the ASP.NET project you are working on fails miserably? You can’t recognize your broken layout, content is all over the place, and you get tons of JavaScript errors?

This post shows you how to update your server to recognize IE11.

The Problem

The problem is quite trivial – a bug in the browser detection under .NET 4. Perhaps you remember how IE10 came out and broke your pages with lots of JavaScript errors? The issue here is the same – these browsers were released after .NET4 and it does not recognize their User-Agent request header.

You can verify that browser detection is causing a problem by using Internet Explorer’s F12 Development tool to temporarily change the User-Agent string sent by the browser. To do so:

  1. Press F12.
  2. Click the Emulation button at the bottom left.
  3. Choose Internet Explorer 9 from the dropdown list.
  4. After the page refreshes, check to see if the page renders correctly.

The Solutions

Of course, you can’t ask your users to do this—but you have three possible solutions to fix your site. I will list them here in the order I suggest you try them. If one does not work, move over to the next:

  1. Install .NET 4.5 on the server – it has the browser detection problem fixed, so you should be all set. We all love simple things – automated installations, cars that drive themselves :)
  2. Yes, I know, .NET 4.5 isn’t available for Windows 2003 Server. Patches are available from Microsoft to update browser detection for older framework versions. (If you tried installing before mid-December 2013, uninstall it and try again.)
  3. If you are still reading, then you may need to update the actual application. Open the App_Browsers folder.
    1. If it has any contents that you do not need – delete them and try again.
    2. If it is empty, the patch failed, and you cannot install .NET 4.5 – add a .browser file that has the correct definitions. I’ve gone and made things easy for you – click this link to download a custom .browser file with the IE11 fix.

That wasn’t so hard, was it?

I hope this was yet another way Telerik helped with your development :)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值