Agent707 Posted July 14, 2006 Posted July 14, 2006 Weird problem. I'm trying to write a function to determine what Browser and version clients are using. Using HttpBrowserCapabilities ...pseudo code Dim bc As HttpBrowserCapabilities bc = Request.Browser Response.Write(bc.Browser & " " bc.Version) Works fine on IE. Show "IE 6" or "IE 5.5"...etc. Even works on Netscape 6.2. Shows "Netscape 6.2" Here's the Problem. On versions of Netscape 7 or greater, it shows the version as 5.0 "Netscape 5.0" I've tested it with 3 newer version. 7.2, 8.0 and 8.1 They all show "5.0" Even if I try to use the .Majorversion + .Minorversion. Same thing. When I pull the server vars for HTTP_USER_AGENT for each browser type, I get this. Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2 (ax) Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20050603 Netscape/8.0.2 Note: The first one returns the correct version (6.2) in my .Net app, where the second and third are returning the Mozilla version (5.0) Anyone have any ideas how I can resolve this? Quote
HJB417 Posted July 18, 2006 Posted July 18, 2006 Probably need to update the browser caps http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/gngrfbrowsercapssection.asp In the past, I've just copied/pasted from http://slingfive.com/pages/code/browserCaps/ into my machine.config. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.