Gathering information about a Web site user is very common task for a web administrator. There are different ways to gather this information such as using log files, IIS logs etc. ASP.NET also provides classes that can be used to gather web site stats. In this article, I will show you how you can collect information about your site visitors using ASP.NET classes provided by the .NET Framework library.
In this my focus will be on one class - HttpRequest. The HttpRequest class provides properties that can be used to read the HTTP values sent by a client browser when a request is made. The HttpRequest class properties are briefly described in Table 1. As you can see from this table, you can get information about browser, application, contents, cookies, filters, headers, referrals, host and so on.
Table 1. HttpRequest class properties
AcceptTypes
Returns a string array of client-supported MIME accept types
ApplicationPath
Returns the ASP.NET application's virtual application root path on the server
Browser
Returns information about the requesting client's browser capabilities
ClientCertificate
Returns the current request's client security certificate
ContentEncoding
Returns the character set of the entity-body
ContentLength
Specifies the length, in bytes, of content sent by the client
ContentType
Returns the MIME content type of the incoming request
Cookies
Returns a collection of cookies sent by the client
CurrentExecutionFilePath
Returns the virtual path of the current request
FilePath
Returns the virtual path of the current request
Files
Returns the collection of client-uploaded files (Multipart MIME format)
Filter
Returns or sets the filter to use when reading the current input stream
Form
Returns a collection of form variables
Headers
Returns a collection of HTTP headers
HttpMethod
Returns the HTTP data transfer method (such as GET, POST, or HEAD) used by the client
InputStream
Returns the contents of the incoming HTTP entity body
IsAuthenticated
Returns a value indicating whether the user has been authenticated
IsSecureConnection
Returns a value indicting whether the HTTP connection uses secure sockets (that is, HTTPS)
Params
Returns a combined collection of QueryString, Form, ServerVariables, and Cookies items
Path
Returns the virtual path of the current request
PathInfo
Returns additional path information for a resource with a URL extension
PhysicalApplicationPath
Returns the physical file system path of the currently executing server application's root directory
PhysicalPath
Returns the physical file system path corresponding to the requested URL
QueryString
Returns the collection of HTTP query string variables
RawUrl
Returns the raw URL of the current request
RequestType
Returns or sets the HTTP data transfer method (GET or POST) used by the client
ServerVariables
Returns a collection of Web server variables
TotalBytes
Returns the number of bytes in the current input stream
Url
Returns Information about the URL of the current request
UrlReferrer
Returns information about the URL of the client's previous request that linked to the current URL
UserAgent
Returns the raw user agent string of the client browser
UserHostAddress
Returns the IP host address of the remote client
UserHostName
Returns the DNS name of the remote client
UserLanguages
Returns a sorted string array of client language preferences

Roshan DubeyPosted Jan 22, 2013, 3:47 PM
Thanks ...! i am happy from your help.
Mahesh ChandPosted Nov 23, 2011, 2:03 AM
Guys, please post all of your questions on the forums.
Tran Van LePosted Oct 26, 2011, 1:47 AM
Gathering a Web Site Users Information in ASP.NET
Tran Van LePosted Oct 26, 2011, 1:46 AM
thanks