Re: Creating browser sniffer with ASP.Net

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Ken Cox [Microsoft MVP] (BANSPAMken_cox_at_sympatico.ca)
Date: 05/03/04


Date: Mon, 3 May 2004 15:49:32 -0400

Hi David,

This article will show you pretty well all of the info you can get using the
Request object in ASP.NET:

HOW TO: Determine the Browser Version in ASP.NET

http://support.microsoft.com/default.aspx?scid=kb;en-us;311281

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
        Dim bc As HttpBrowserCapabilities
        Dim s As String = ""
        bc = Request.Browser
        With bc
            s &= "Browser Capabilities" & vbCrLf
            s &= "Type = " & .Type & vbCrLf
            s &= "Name = " & .Browser & vbCrLf
            s &= "Version = " & .Version & vbCrLf
            s &= "Major Version = " & .MajorVersion & vbCrLf
            s &= "Minor Version = " & .MinorVersion & vbCrLf
            s &= "Platform = " & .Platform & vbCrLf
            s &= "Is Beta = " & .Beta & vbCrLf
            s &= "Is Crawler = " & .Crawler & vbCrLf
            s &= "Is AOL = " & .AOL & vbCrLf
            s &= "Is Win16 = " & .Win16 & vbCrLf
            s &= "Is Win32 = " & .Win32 & vbCrLf
            s &= "Supports Frames = " & .Frames & vbCrLf
            s &= "Supports Tables = " & .Tables & vbCrLf
            s &= "Supports Cookies = " & .Cookies & vbCrLf
            s &= "Supports VB Script = " & .VBScript & vbCrLf
            s &= "Supports JavaScript = " & .JavaScript & vbCrLf
            s &= "Supports Java Applets = " & .JavaApplets & vbCrLf
            s &= "Supports ActiveX Controls = " & .ActiveXControls & vbCrLf
        End With
        TextBox1.Text = s
End Sub

HOW TO: Determine Browser Type in Server-Side Code Without the BrowserType
Object in ASP.NET

http://support.microsoft.com/default.aspx?scid=kb;en-us;306576

"David Baker" <anonymous@discussions.microsoft.com> wrote in message
news:9AECFF9D-F1DB-44A1-B3A2-4734404D745D@microsoft.com...
> Hi all,
>
> I am very new to ASP.Net. I am trying to create a sniffer for our program.
> We want our users to click our sniffer and hopefully the sniffer will
> check their computer against our requirements. I would like to ask experts
> like you to see which items are actually doable with ASP.Net. Below I
> listed all of the items we are looking for but I can understand if some of
> the items are impossible to check/sniff. We would like to create a sniffer
> that returns the results for the below items:
>
> Broswer (minimum requirement is I.E. 6 for PC and Safari for Mac OS X)
> Browser type (This area will tell them what they have -AOL, MSN, IE...etc
> and in the list returns a red gif image if they don't have IE 6 or Safari)
> Browser version (This area will tell them what version they have and again
> returns a red gif image if they have an earlier version)
> Cookies (In this area we are basically trying to find out in the browser
> window - just for IE - if their privacy setting is set to the following:
> The window name is: Advanced Privacy Settings. We want "Override automatic
> cookie handling" to be checked; first-party-cookies and
> third-party-cookies radio buttons are checked and "Always allow session
> cookies" are checked. We also want if our website is listed in the "Per
> Site Privacy Actions" window (you can get to window by clicking in IE
> Tools-Internet Options-Privacy-Websites-Edit))
> Cache (In this area we are trying to find out if their "Temporary Internet
> Files" settings is set to "Every visit to the page")
> OS Version (This area will tell them what version they have and returns a
> red gif image if they don't have Windows XP or Mac OS X)
> Connection speed (This area will tell them what their connection speed is
> and returns a red gif image if they have dial-up connection)
> Display settings (This area will tell them what their screen resolution
> is)
> Service Pack ( This area will tell them if they have Service Pack 1 for
> Windows XP)
> Flash (This area will tell them if they have Flash plug-ins)
> Java (This area will tell them if they have Java Virtual Machine)
> Java Applets (This area will tell them if they have some of our applets
> installed in this directory: C:\WINNT\Downloaded Program Files)
> Java Script (This area will tell them if some of the items in browsers
> "Security Setting" window (IE-Tools-Options-Security-Custom Level)
> Adobe Acrobat Reader (This area will tell them if they have Acrobat Reader
> 6.0)
> Do you have a media player? (This area will tell them if they have any
> media player (Windows Media, Real player, Winamp...etc)
> What program will open TIFs (This area will tell them what program is
> associated to open with the files with the extension .tiff)
> Firewall check (This area will tell them if they are behind a firewall)
> Pop-up window check (This area will tell them if there is any program that
> is blocking pop-up windows such as search toolbars)
> Parasites (This are will tell them if they are infected with parasites)
>
> Thank you in advance. Any ideas would help.
>
> Dave Baker
>



Relevant Pages

  • Re: Creating browser sniffer with ASP.Net
    ... That's a heck of a lot more information than their browser is going to send ... window - just for IE - if their privacy setting is set to the following: ... > Java ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: browser screen capture with java applet
    ... the applet would be to do the job of the actual image capturing on each ... current browser window - if that's relevant. ... minimum Java version. ...
    (comp.lang.java.programmer)
  • Re: Why you should use a firewall on Win98
    ... it was "java" gray inside ... Imagine if that same java installer had been setup to steal and ... I've not felt safe in any browser since then. ... got a single wide format popup window, ...
    (comp.security.firewalls)
  • Re: FrontPage PhotoGallery Formatting Question
    ... java applets any more, such as hover buttons etc. because of this probelm ... effectivly brought my browser to its knees. ... > Here's my question about PhotoGallery to add to the sea of questions. ... > problem I am encountering is when someone resizes the browser window the ...
    (microsoft.public.frontpage.client)
  • comp.lang.javascript FAQ - Quick Answers 2008-10-13
    ... Javascript Tips ... _How can I disable the back button in a web browser_? ... _How do I check to see if a child window is open, ... upon the cache headers that your server sends. ...
    (comp.lang.javascript)