Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > HTTPBrowserCapabilities Question

Reply
Thread Tools

HTTPBrowserCapabilities Question

 
 
kevinwjames@gmail.com
Guest
Posts: n/a
 
      12-23-2005
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.

 
Reply With Quote
 
 
 
 
Karl Seguin
Guest
Posts: n/a
 
      12-23-2005
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!



<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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.
>



 
Reply With Quote
 
 
 
 
kevinwjames@gmail.com
Guest
Posts: n/a
 
      12-23-2005
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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
browsernames for HttpBrowserCapabilities IsBrowser kdfake@spam.com ASP .Net 3 06-23-2006 08:34 PM
Does HttpBrowserCapabilities work? =?Utf-8?B?Um9iZXJ0IFcu?= ASP .Net 5 04-28-2006 09:16 PM
WebControls (Like : HttpBrowserCapabilities) and Safari Compatibility ? Nico ASP .Net Web Controls 1 07-15-2004 05:23 PM
Question re: features of the 831 router (also a 924 question) Wayne Cisco 0 03-02-2004 07:57 PM
HttpBrowserCapabilities not returning correct netscape version Earl T ASP .Net 4 10-15-2003 02:34 PM



Advertisments