HttpRequestBase Class
TOC
Collapse the table of content
Expand the table of content

HttpRequestBase Class

 

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

Namespace:   System.Web
Assembly:  System.Web (in System.Web.dll)

System.Object
  System.Web.HttpRequestBase
    System.Web.HttpRequestWrapper

public abstract class HttpRequestBase

NameDescription
System_CAPS_protmethodHttpRequestBase()

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

NameDescription
System_CAPS_pubpropertyAcceptTypes

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

System_CAPS_pubpropertyAnonymousID

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

System_CAPS_pubpropertyApplicationPath

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

System_CAPS_pubpropertyAppRelativeCurrentExecutionFilePath

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").

System_CAPS_pubpropertyBrowser

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

System_CAPS_pubpropertyClientCertificate

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

System_CAPS_pubpropertyContentEncoding

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

System_CAPS_pubpropertyContentLength

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

System_CAPS_pubpropertyContentType

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

System_CAPS_pubpropertyCookies

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

System_CAPS_pubpropertyCurrentExecutionFilePath

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

System_CAPS_pubpropertyCurrentExecutionFilePathExtension

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

System_CAPS_pubpropertyFilePath

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

System_CAPS_pubpropertyFiles

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

System_CAPS_pubpropertyFilter

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

System_CAPS_pubpropertyForm

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

System_CAPS_pubpropertyHeaders

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

System_CAPS_pubpropertyHttpChannelBinding

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

System_CAPS_pubpropertyHttpMethod

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

System_CAPS_pubpropertyInputStream

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

System_CAPS_pubpropertyIsAuthenticated

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

System_CAPS_pubpropertyIsLocal

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

System_CAPS_pubpropertyIsSecureConnection

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

System_CAPS_pubpropertyItem[String]

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

System_CAPS_pubpropertyLogonUserIdentity

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

System_CAPS_pubpropertyParams

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

System_CAPS_pubpropertyPath

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

System_CAPS_pubpropertyPathInfo

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

System_CAPS_pubpropertyPhysicalApplicationPath

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

System_CAPS_pubpropertyPhysicalPath

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

System_CAPS_pubpropertyQueryString

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

System_CAPS_pubpropertyRawUrl

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

System_CAPS_pubpropertyReadEntityBodyMode

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.

System_CAPS_pubpropertyRequestContext

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

System_CAPS_pubpropertyRequestType

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

System_CAPS_pubpropertyServerVariables

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

System_CAPS_pubpropertyTimedOutToken

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

System_CAPS_pubpropertyTlsTokenBindingInfo

Gets or sets the token binding information for this instance.

System_CAPS_pubpropertyTotalBytes

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

System_CAPS_pubpropertyUnvalidated

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

System_CAPS_pubpropertyUrl

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

System_CAPS_pubpropertyUrlReferrer

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

System_CAPS_pubpropertyUserAgent

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

System_CAPS_pubpropertyUserHostAddress

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

System_CAPS_pubpropertyUserHostName

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

System_CAPS_pubpropertyUserLanguages

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

NameDescription
System_CAPS_pubmethodAbort()

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

System_CAPS_pubmethodBinaryRead(Int32)

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

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetBufferedInputStream()

System_CAPS_pubmethodGetBufferlessInputStream()

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.

System_CAPS_pubmethodGetBufferlessInputStream(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.

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodInsertEntityBody()

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

System_CAPS_pubmethodInsertEntityBody(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.

System_CAPS_pubmethodMapImageCoordinates(String)

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

System_CAPS_pubmethodMapPath(String)

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

System_CAPS_pubmethodMapPath(String, String, Boolean)

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

System_CAPS_pubmethodMapRawImageCoordinates(String)

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

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodSaveAs(String, Boolean)

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

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

System_CAPS_pubmethodValidateInput()

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

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.

.NET Framework
Available since 3.5

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft