Translate Custom UserAgent String

S

Snuske

Hi'

From a database I collect a lot of UserAgent strings (e.g.
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322;
..NET CLR 1.0.3705)"). I would like to get these string translated to a
object like the System.Web.HttpBrowserCapabilities (aka.
Request.Browser in ASP.NET).

Any suggestions?


Best Regards
Snuske
 
J

John Saunders

Snuske said:
Hi'

From a database I collect a lot of UserAgent strings (e.g.
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322;
.NET CLR 1.0.3705)"). I would like to get these string translated to a
object like the System.Web.HttpBrowserCapabilities (aka.
Request.Browser in ASP.NET).

I don't see an easy way to do that. I think you'd have to parse the
UserAgent strings yourself and check them against the <browserCaps> section
of machine.config.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top