I have a asp.net website in which i check for supported browser.
That is i user
Request.Browser.Browser — for the browser name
and
Request.Browser.MajorVersion for the browser version
Problem here is browser Safari and Google Chrome show me the same value !!!
That is AppleMAC-Safari(name) and version would be 5..
How do i differentiate between google chrome and safari then ???
Thanks ,
Francis P.
For each browser that Request.Browser.Browser can detect, there must be a *.browser file in C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG\Browsers. Chrome and Safari are missing in version 2 of the .NET framework, but you can download an updated set of browser configurations from codeplex: http://aspnet.codeplex.com/releases/view/41420
There could possibly occur some compatibility issues (since these files are made for .NET 4). In such cases you may have a look at this blog post: http://stephenwalther.com/blog/archive/2010/03/05/use-asp.net-4-browser-definitions-with-asp.net-3.5.aspx