469,955 Members | 2,606 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,955 developers. It's quick & easy.

HTTPBrowserCapabilities Question

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.

Dec 23 '05 #1
2 2869
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

--
MY ASP.Net tutorials
http://www.openmymind.net/
http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!

<ke*********@gmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
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.

Dec 23 '05 #2
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.

Dec 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Stevey | last post: by
10 posts views Thread by glenn | last post: by
53 posts views Thread by Jeff | last post: by
5 posts views Thread by Robert W. | last post: by
4 posts views Thread by =?Utf-8?B?Wm9sdA==?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.