HTTPBrowserCapabilities Question

Discussion in 'ASP .Net' started by kevinwjames@gmail.com, Dec 23, 2005.

  1. Guest

    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, 2005
    #1
    1. Advertising

  2. Karl Seguin Guest

    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!



    <> wrote in message
    news:...
    > 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.
    >
    Karl Seguin, Dec 23, 2005
    #2
    1. Advertising

  3. Guest

    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, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Earl T
    Replies:
    4
    Views:
    463
    Jim Cheshire [MSFT]
    Oct 15, 2003
  2. sean
    Replies:
    1
    Views:
    589
    Cowboy \(Gregory A. Beamer\)
    Oct 20, 2003
  3. =?Utf-8?B?Um9iZXJ0IFcu?=

    Does HttpBrowserCapabilities work?

    =?Utf-8?B?Um9iZXJ0IFcu?=, Apr 28, 2006, in forum: ASP .Net
    Replies:
    5
    Views:
    2,862
    Juan T. Llibre
    Apr 28, 2006
  4. Replies:
    3
    Views:
    2,806
  5. Nico
    Replies:
    1
    Views:
    206
    Scott G.
    Jul 15, 2004
Loading...

Share This Page