Home Dashboard Directory Help
Search

ASP.NET user-agent sniffing and IE10 (Internet Explorer 10) by Alkarex


Status: 

Closed
 as Fixed Help for as Fixed


4
0
Sign in
to vote
Type: Bug
ID: 662275
Opened: 4/16/2011 5:02:27 AM
Access Restriction: Public
1
Workaround(s)
view
5
User(s) can reproduce this bug

Description

Hello,

== Facts ==

- ASP.NET is using user-agent sniffing per default.

- Internet Explorer 10 has a user-agent string not known to .NET 4, as visible in the shipped file "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\Browsers\ie.browser"
More information on http://blogs.msdn.com/b/ie/archive/2011/04/15/the-ie10-user-agent-string.aspx

- Not surprisingly, IE10 is therefore not recognised by ASP.NET as having e.g. JavaScript and cookies.

== Bug ==

As a consequence, a central function such as __doPostBack() is not emitted properly by ASP.NET for IE10, and every component relying on a post back do not work, such as asp:LinkButton and everything using AutoPostBack.
This is directly visible by comparing the HTML/JavaScript source code sent to IE9 and the one sent to IE10.

== Workaround ==

In the meantime to make it work and to avoid similar issues in the future, I use a file ~\App_Browsers\BrowserFile.browser with the following:

<browsers>
<browser refID="Default">
<capabilities><!-- To avoid wrong detections of e.g. IE10 -->
<capability name="cookies" value="true" />
<capability name="ecmascriptversion" value="3.0" />
</capabilities>
</browser>
</browsers>

== Suggestions ==

- Provide a way to disable user-agent sniffing all together.

- Address the special case of IE10 by shipping an update to .NET.

- When needed, replace user-agent sniffing by feature detection, as advised even by some Microsoft teams
http://blogs.msdn.com/b/ie/archive/2011/04/15/the-ie10-user-agent-string.aspx


Cordially,
Alexandre Alapetite
http://alexandre.alapetite.fr
Details
Sign in to post a comment.
Posted by dev_michael on 11/5/2013 at 4:59 AM
This link helped me to solve the issues. Thanks to Scott (as so often).

http://www.hanselman.com/blog/BugAndFixASPNETFailsToDetectIE10CausingDoPostBackIsUndefinedJavaScriptErrorOrMaintainFF5ScrollbarPosition.aspx

Posted by kRAThor on 7/17/2013 at 8:42 AM
Microsoft is aggressively pushing IE10 via Windows Update & a reliable solution has still not been pushed out via Windows update. Why???
Posted by Microsoft on 11/12/2012 at 1:33 PM
please refer http://support.microsoft.com/kb/2600088 for .NET 4.0
Refer http://support.microsoft.com/kb/2608565 for .Net 3.5
Posted by Jmaxxz on 9/28/2012 at 11:39 AM
The proxy maybe a red herring, I see the issue when I hit a the published version of my app, but not when I am running in the debugger.
Posted by Jmaxxz on 9/28/2012 at 11:37 AM
This is still an issue, I am seeing it while running MVC4 + .NET 4.0. Interestingly now it is only occurring when IE10 is going through a proxy.
Posted by kindbergs.dk on 7/30/2011 at 2:26 AM
Which exact ASP.NET release number/name is it that contain this fix?
When will it be released?
And will it work with .NET 2.0/3.5 websites too, or should we manually change the IIS configuration (or use the .browser-workaround) for all old .NET 2.0/3.5 websites?
Posted by Microsoft on 5/10/2011 at 9:29 AM
Hi,

We have fixed this bug in ASP.NET browser capabilities. The fix will be available in the next release of the ASP.NET runtime.

Thanks,
The ASP.NET Team
Posted by Microsoft on 4/18/2011 at 12:46 AM
Thank you for submitting feedback on Visual Studio 2010 and .NET Framework. Your issue has been routed to the appropriate VS development team for review. We will contact you if we require any additional information.
Posted by Microsoft on 4/16/2011 at 5:14 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.
Posted by Alkarex on 4/16/2011 at 5:05 AM
In the meantime to circumvent ASP.NET user-agent sniffing and to avoid similar issues in the future, I use a file ~\App_Browsers\BrowserFile.browser with the following:

<browsers>
<browser refID="Default">
<capabilities><!-- To avoid wrong detections of e.g. IE10 -->
<capability name="cookies" value="true" />
<capability name="ecmascriptversion" value="3.0" />
</capabilities>
</browser>
</browsers>

Cordially,
Alexandre Alapetite
http://alexandre.alapetite.fr