Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Recognizing the browser
Message
De
13/01/2015 14:07:13
 
 
À
13/01/2015 03:12:19
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01613449
Message ID:
01613527
Vues:
40
OK, I wasn't quite right. However...the .Net framework relies on what the browser returns to determine what browser is being used. That's what the browser definition files are for. IE11 changed the user agent string, which could affect how the framework determines which browser is being used, especially if you don't have updated browser definition files.

But... you shouldn't use browser sniffing to determine what browser is being used. See http://blogs.msdn.com/b/ieinternals/archive/2013/09/21/internet-explorer-11-user-agent-string-ua-string-sniffing-compatibility-with-gecko-webkit.aspx


>Don't believe that's true. The useragent string for IE11 shows 'MSIE 11'
>I think it's the .NET browser definition files that provide the HttpBrowserCapabilities.Browser string....
>
>>The framework only returns what the browser says. It changed in IE11.
>>
>>>I had to adjust my code to recognize the browser like this:
>>>
>>>
>>>        ' Based on the browser
>>>        Select Case oBrowser.Browser
>>>
>>>            ' Microsoft Internet Explorer
>>>            ' Recent version of Internet Explorer returns InternetExplorer (11)
>>>            Case "InternetExplorer", "IE"
>>>
>>>
>>>At first, I had IE. That used to work for a few years. Then, I discovered the value returned was InternetExplorer. So, I adjusted for that. I assumed something got changed in the .NET Framework in the way this is now returned. But, actually, this is coming from the browser information and .NET Framework simply use that as is. So, I had to add IE back in there. Basically, it seems the longer word is returned from recent version of Internet Explorer only. Can someone confirm that?
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform