HTTPBrowserCapabilities Question

K

kevinwjames

I'm writing a C# app which analyzes and reports on IIS web logs. I've
got it producing numbers for hits, visits, ips, etc. but I'm having
trouble parsing the UserAgent string so I can get Browser, OS, and
Version information.

So I saw this great System.Web.HTTPBrowserCapabilities object which
will parse the User Agent string for me and tell me everything I need.
Only problem is there's no easy way to create an instance of this
object except by actual getting a request from a browser...

Any ideas of how to use this object's user agent parsing capabilities
on a string that I supply?
Thanks.
 
K

Karl Seguin

I doubt it. You might have an entry point with the static
HttpcababilitiesBase.GetConfigCapabilities method. But you'll need to set
up so much pseudo-request stuff that it won't be worth it.

Karl
 
K

kevinwjames

Thanks Karl. Actually, I found a solution. I downloaded the Mono C#
source code, found the HttpBrowserCapabilities class. It's easy to
modify, since it compiles fine under Microsoft's .NET.
 

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

Staff online

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top