HttpRequestBase HttpRequestBase HttpRequestBase HttpRequestBase Class

Definition

Serves as the base class for classes that enable ASP.NET to read the HTTP values sent by a client during a Web request.

public ref class HttpRequestBase abstract
public abstract class HttpRequestBase
type HttpRequestBase = class
Public MustInherit Class HttpRequestBase
Inheritance
HttpRequestBaseHttpRequestBaseHttpRequestBaseHttpRequestBase
Derived

Remarks

The HttpRequestBase class is an abstract class that contains the same members as the HttpRequest class. The HttpRequestBase class enables you to create derived classes that are like the HttpRequest class, but that you can customize and that work outside the ASP.NET pipeline. When you perform unit testing, you typically use a derived class to implement members that have customized behavior that fulfills the scenario that you are testing.

The HttpRequestWrapper class derives from the HttpRequestBase class. The HttpRequestWrapper class serves as a wrapper for the HttpRequest class. At run time, you typically use an instance of the HttpRequestWrapper class to invoke members of the HttpRequest object.

Constructors

HttpRequestBase() HttpRequestBase() HttpRequestBase() HttpRequestBase()

Initializes the class for use by an inherited class instance. This constructor can only be called by an inherited class.

Properties

AcceptTypes AcceptTypes AcceptTypes AcceptTypes

When overridden in a derived class, gets an array of client-supported MIME accept types.

AnonymousID AnonymousID AnonymousID AnonymousID

When overridden in a derived class, gets the anonymous identifier for the user, if it is available.

ApplicationPath ApplicationPath ApplicationPath ApplicationPath

When overridden in a derived class, gets the virtual root path of the ASP.NET application on the server.

AppRelativeCurrentExecutionFilePath AppRelativeCurrentExecutionFilePath AppRelativeCurrentExecutionFilePath AppRelativeCurrentExecutionFilePath

When overridden in a derived class, gets the virtual path of the application root and makes it relative by using the tilde (~) notation for the application root (as in "~/page.aspx").

Browser Browser Browser Browser

When overridden in a derived class, gets information about the requesting client's browser capabilities.

ClientCertificate ClientCertificate ClientCertificate ClientCertificate

When overridden in a derived class, gets the current request's client security certificate.

ContentEncoding ContentEncoding ContentEncoding ContentEncoding

When overridden in a derived class, gets or sets the character set of the data that is provided by the client.

ContentLength ContentLength ContentLength ContentLength

When overridden in a derived class, gets the length, in bytes, of content that was sent by the client.

ContentType ContentType ContentType ContentType

When overridden in a derived class, gets or sets the MIME content type of the request.

Cookies Cookies Cookies Cookies

When overridden in a derived class, gets the collection of cookies that were sent by the client.

CurrentExecutionFilePath CurrentExecutionFilePath CurrentExecutionFilePath CurrentExecutionFilePath

When overridden in a derived class, gets the virtual path of the current request.

CurrentExecutionFilePathExtension CurrentExecutionFilePathExtension CurrentExecutionFilePathExtension CurrentExecutionFilePathExtension

When implemented in a derived class, gets the extension of the file name that is specified in the CurrentExecutionFilePath property.

FilePath FilePath FilePath FilePath

When overridden in a derived class, gets the virtual path of the current request.

Files Files Files Files

When overridden in a derived class, gets the collection of files that were uploaded by the client, in multipart MIME format.

Filter Filter Filter Filter

When overridden in a derived class, gets or sets the filter to use when the current input stream is being read.

Form Form Form Form

When overridden in a derived class, gets the collection of form variables that were sent by the client.

Headers Headers Headers Headers

When overridden in a derived class, gets the collection of HTTP headers that were sent by the client.

HttpChannelBinding HttpChannelBinding HttpChannelBinding HttpChannelBinding

When overridden in a derived class, gets the ChannelBinding object of the current HttpWorkerRequest instance.

HttpMethod HttpMethod HttpMethod HttpMethod

When overridden in a derived class, gets the HTTP data-transfer method (such as GET, POST, or HEAD) that was used by the client.

InputStream InputStream InputStream InputStream

When overridden in a derived class, gets the contents of the incoming HTTP entity body.

IsAuthenticated IsAuthenticated IsAuthenticated IsAuthenticated

When overridden in a derived class, gets a value that indicates whether the request has been authenticated.

IsLocal IsLocal IsLocal IsLocal

When overridden in a derived class, gets a value that indicates whether the request is from the local computer.

IsSecureConnection IsSecureConnection IsSecureConnection IsSecureConnection

When overridden in a derived class, gets a value that indicates whether the HTTP connection uses secure sockets (HTTPS protocol).

Item[String] Item[String] Item[String] Item[String]

When overridden in a derived class, gets the specified object from the Cookies, Form, QueryString, or ServerVariables collections.

LogonUserIdentity LogonUserIdentity LogonUserIdentity LogonUserIdentity

When overridden in a derived class, gets the WindowsIdentity type for the current user.

Params Params Params Params

When overridden in a derived class, gets a combined collection of QueryString, Form, ServerVariables, and Cookies items.

Path Path Path Path

When overridden in a derived class, gets the virtual path of the current request.

PathInfo PathInfo PathInfo PathInfo

When overridden in a derived class, gets additional path information for a resource that has a URL extension.

PhysicalApplicationPath PhysicalApplicationPath PhysicalApplicationPath PhysicalApplicationPath

When overridden in a derived class, gets the physical file-system path of the current application's root directory.

PhysicalPath PhysicalPath PhysicalPath PhysicalPath

When overridden in a derived class, gets the physical file-system path of the requested resource.

QueryString QueryString QueryString QueryString

When overridden in a derived class, gets the collection of HTTP query-string variables.

RawUrl RawUrl RawUrl RawUrl

When overridden in a derived class, gets the complete URL of the current request.

ReadEntityBodyMode ReadEntityBodyMode ReadEntityBodyMode ReadEntityBodyMode

When implemented in a derived class, gets a value that indicates whether the request entity body has been read, and if so, how it was read.

RequestContext RequestContext RequestContext RequestContext

When overridden in a derived class, gets the RequestContext instance of the current request.

RequestType RequestType RequestType RequestType

When overridden in a derived class, gets or sets the HTTP data-transfer method (GET or POST) that was used by the client.

ServerVariables ServerVariables ServerVariables ServerVariables

When overridden in a derived class, gets a collection of Web server variables.

TimedOutToken TimedOutToken TimedOutToken TimedOutToken

When implemented in a derived class, gets a CancellationToken object that is tripped when a request times out.

TlsTokenBindingInfo TlsTokenBindingInfo TlsTokenBindingInfo TlsTokenBindingInfo

Gets or sets the token binding information for this instance.

TotalBytes TotalBytes TotalBytes TotalBytes

When overridden in a derived class, gets the number of bytes in the current input stream.

Unvalidated Unvalidated Unvalidated Unvalidated

When implemented in a derived class, provides access to HTTP request values without triggering request validation.

Url Url Url Url

When overridden in a derived class, gets information about the URL of the current request.

UrlReferrer UrlReferrer UrlReferrer UrlReferrer

When overridden in a derived class, gets information about the URL of the client request that linked to the current URL.

UserAgent UserAgent UserAgent UserAgent

When overridden in a derived class, gets the complete user-agent string of the client.

UserHostAddress UserHostAddress UserHostAddress UserHostAddress

When overridden in a derived class, gets the IP host address of the client.

UserHostName UserHostName UserHostName UserHostName

When overridden in a derived class, gets the DNS name of the client.

UserLanguages UserLanguages UserLanguages UserLanguages

When overridden in a derived class, gets a sorted array of client language preferences.

Methods

Abort() Abort() Abort() Abort()

Forcibly terminates the underlying TCP connection, causing any outstanding I/O to fail.

BinaryRead(Int32) BinaryRead(Int32) BinaryRead(Int32) BinaryRead(Int32)

When overridden in a derived class, performs a binary read of a specified number of bytes from the current input stream.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetBufferedInputStream() GetBufferedInputStream() GetBufferedInputStream() GetBufferedInputStream()

When implemented in a derived class, gets a Stream object that can be used to read the incoming HTTP entity body.

GetBufferlessInputStream() GetBufferlessInputStream() GetBufferlessInputStream() GetBufferlessInputStream()

When implemented in a derived class, gets a Stream object that can be used to read the incoming HTTP entity body, optionally disabling the request length limit that is set in the MaxRequestLength property.

GetBufferlessInputStream(Boolean) GetBufferlessInputStream(Boolean) GetBufferlessInputStream(Boolean) GetBufferlessInputStream(Boolean)

When implemented in a derived class, gets a Stream object that can be used to read the incoming HTTP entity body, optionally disabling the request length limit that is set in the MaxRequestLength property.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
InsertEntityBody() InsertEntityBody() InsertEntityBody() InsertEntityBody()

When implemented in a derived class, provides a copy of the HTTP request entity body to IIS.

InsertEntityBody(Byte[], Int32, Int32) InsertEntityBody(Byte[], Int32, Int32) InsertEntityBody(Byte[], Int32, Int32) InsertEntityBody(Byte[], Int32, Int32)

When implemented in a derived class, provides IIS with a copy of the HTTP request entity body and with information about the request entity object.

MapImageCoordinates(String) MapImageCoordinates(String) MapImageCoordinates(String) MapImageCoordinates(String)

When overridden in a derived class, maps an incoming image-field form parameter to appropriate x-coordinate and y-coordinate values.

MapPath(String) MapPath(String) MapPath(String) MapPath(String)

When overridden in a derived class, maps the specified virtual path to a physical path on the server.

MapPath(String, String, Boolean) MapPath(String, String, Boolean) MapPath(String, String, Boolean) MapPath(String, String, Boolean)

When overridden in a derived class, maps the specified virtual path to a physical path on the server.

MapRawImageCoordinates(String) MapRawImageCoordinates(String) MapRawImageCoordinates(String) MapRawImageCoordinates(String)

Maps an incoming image field form parameter into appropriate x and y coordinate values.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
SaveAs(String, Boolean) SaveAs(String, Boolean) SaveAs(String, Boolean) SaveAs(String, Boolean)

When overridden in a derived class, saves an HTTP request to disk.

ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)
ValidateInput() ValidateInput() ValidateInput() ValidateInput()

When overridden in a derived class, causes validation to occur for the collections that are accessed through the Cookies, Form, and QueryString properties.

Applies to