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

HttpWorkerRequest Class

 

This abstract class defines the base worker methods and enumerations used by ASP.NET managed code to process requests.

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


[ComVisibleAttribute(false)]
public abstract class HttpWorkerRequest

NameDescription
System_CAPS_protmethodHttpWorkerRequest()

Initializes a new instance of the HttpWorkerRequest class.

NameDescription
System_CAPS_pubpropertyMachineConfigPath

Gets the full physical path to the Machine.config file.

System_CAPS_pubpropertyMachineInstallDirectory

Gets the physical path to the directory where the ASP.NET binaries are installed.

System_CAPS_pubpropertyRequestTraceIdentifier

Gets the corresponding Event Tracking for Windows trace ID for the current request.

System_CAPS_pubpropertyRootWebConfigPath

Gets the full physical path to the root Web.config file.

System_CAPS_pubpropertySupportsAsyncFlush

Gets a value that indicates whether asynchronous flush operations are supported.

System_CAPS_pubpropertySupportsAsyncRead

Gets a value that indicates whether asynchronous read operations are supported.

NameDescription
System_CAPS_pubmethodBeginFlush(AsyncCallback, Object)

System_CAPS_pubmethodBeginRead(Byte[], Int32, Int32, AsyncCallback, Object)

Begins an asynchronous read operation of the request entity body.

System_CAPS_pubmethodCloseConnection()

Terminates the connection with the client.

System_CAPS_pubmethodEndFlush(IAsyncResult)

Waits for the pending asynchronous flush operation to complete.

System_CAPS_pubmethodEndOfRequest()

Used by the runtime to notify the HttpWorkerRequest that request processing for the current request is complete.

System_CAPS_pubmethodEndRead(IAsyncResult)

Waits for the pending asynchronous read operation to complete.

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_pubmethodFlushResponse(Boolean)

Sends all pending response data to the client.

System_CAPS_pubmethodGetAppPath()

Returns the virtual path to the currently executing server application.

System_CAPS_pubmethodGetAppPathTranslated()

Returns the physical path to the currently executing server application.

System_CAPS_pubmethodGetAppPoolID()

This API supports the product infrastructure and is not intended to be used directly from your code. When overridden in a derived class, returns the application pool ID for the current URL.

System_CAPS_pubmethodGetBytesRead()

This API supports the product infrastructure and is not intended to be used directly from your code. Gets the number of bytes read in from the client.

System_CAPS_pubmethodGetClientCertificate()

This API supports the product infrastructure and is not intended to be used directly from your code. When overridden in a derived class, gets the certification fields (specified in the X.509 standard) from a request issued by the client.

System_CAPS_pubmethodGetClientCertificateBinaryIssuer()

This API supports the product infrastructure and is not intended to be used directly from your code. Gets the certificate issuer, in binary format.

System_CAPS_pubmethodGetClientCertificateEncoding()

This API supports the product infrastructure and is not intended to be used directly from your code. When overridden in a derived class, returns the Encoding object in which the client certificate was encoded.

System_CAPS_pubmethodGetClientCertificatePublicKey()

This API supports the product infrastructure and is not intended to be used directly from your code. When overridden in a derived class, gets a PublicKey object associated with the client certificate.

System_CAPS_pubmethodGetClientCertificateValidFrom()

This API supports the product infrastructure and is not intended to be used directly from your code. When overridden in a derived class, gets the date when the certificate becomes valid. The date varies with international settings.

System_CAPS_pubmethodGetClientCertificateValidUntil()

This API supports the product infrastructure and is not intended to be used directly from your code. Gets the certificate expiration date.

System_CAPS_pubmethodGetConnectionID()

This API supports the product infrastructure and is not intended to be used directly from your code. When overridden in a derived class, returns the ID of the current connection.

System_CAPS_pubmethodGetFilePath()

When overridden in a derived class, returns the virtual path to the requested URI.

System_CAPS_pubmethodGetFilePathTranslated()

Returns the physical file path to the requested URI (and translates it from virtual path to physical path: for example, "/proj1/page.aspx" to "c:\dir\page.aspx")

System_CAPS_pubmethodGetHashCode()

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

System_CAPS_pubmethodGetHttpVerbName()

Returns the specified member of the request header.

System_CAPS_pubmethodGetHttpVersion()

Provides access to the HTTP version of the request (for example, "HTTP/1.1").

System_CAPS_pubmethodGetKnownRequestHeader(Int32)

Returns the standard HTTP request header that corresponds to the specified index.

System_CAPS_pubmethodSystem_CAPS_staticGetKnownRequestHeaderIndex(String)

Returns the index number of the specified HTTP request header.

System_CAPS_pubmethodSystem_CAPS_staticGetKnownRequestHeaderName(Int32)

Returns the name of the specified HTTP request header.

System_CAPS_pubmethodSystem_CAPS_staticGetKnownResponseHeaderIndex(String)

Returns the index number of the specified HTTP response header.

System_CAPS_pubmethodSystem_CAPS_staticGetKnownResponseHeaderName(Int32)

Returns the name of the specified HTTP response header.

System_CAPS_pubmethodGetLocalAddress()

Provides access to the specified member of the request header.

System_CAPS_pubmethodGetLocalPort()

Provides access to the specified member of the request header.

System_CAPS_pubmethodGetPathInfo()

Returns additional path information for a resource with a URL extension. That is, for the path /virdir/page.html/tail, the GetPathInfo value is /tail.

System_CAPS_pubmethodGetPreloadedEntityBody()

Returns the portion of the HTTP request body that has already been read.

System_CAPS_pubmethodGetPreloadedEntityBody(Byte[], Int32)

Gets the portion of the HTTP request body that has currently been read by using the specified buffer data and byte offset.

System_CAPS_pubmethodGetPreloadedEntityBodyLength()

Gets the length of the portion of the HTTP request body that has currently been read.

System_CAPS_pubmethodGetProtocol()

When overridden in a derived class, returns the HTTP protocol (HTTP or HTTPS).

System_CAPS_pubmethodGetQueryString()

Returns the query string specified in the request URL.

System_CAPS_pubmethodGetQueryStringRawBytes()

When overridden in a derived class, returns the response query string as an array of bytes.

System_CAPS_pubmethodGetRawUrl()

Returns the URL path contained in the request header with the query string appended.

System_CAPS_pubmethodGetRemoteAddress()

Provides access to the specified member of the request header.

System_CAPS_pubmethodGetRemoteName()

When overridden in a derived class, returns the name of the client computer.

System_CAPS_pubmethodGetRemotePort()

Provides access to the specified member of the request header.

System_CAPS_pubmethodGetRequestReason()

This API supports the product infrastructure and is not intended to be used directly from your code. When overridden in a derived class, returns the reason for the request.

System_CAPS_pubmethodGetServerName()

When overridden in a derived class, returns the name of the local server.

System_CAPS_pubmethodGetServerVariable(String)

Returns a single server variable from a dictionary of server variables associated with the request.

System_CAPS_pubmethodSystem_CAPS_staticGetStatusDescription(Int32)

Returns a string that describes the name of the specified HTTP status code.

System_CAPS_pubmethodGetTotalEntityBodyLength()

Gets the length of the entire HTTP request body.

System_CAPS_pubmethodGetType()

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

System_CAPS_pubmethodGetUnknownRequestHeader(String)

Returns a nonstandard HTTP request header value.

System_CAPS_pubmethodGetUnknownRequestHeaders()

Get all nonstandard HTTP header name-value pairs.

System_CAPS_pubmethodGetUriPath()

Returns the virtual path to the requested URI.

System_CAPS_pubmethodGetUrlContextID()

This API supports the product infrastructure and is not intended to be used directly from your code. When overridden in a derived class, returns the context ID of the current connection.

System_CAPS_pubmethodGetUserToken()

When overridden in a derived class, returns the client's impersonation token.

System_CAPS_pubmethodGetVirtualPathToken()

This API supports the product infrastructure and is not intended to be used directly from your code. Gets the impersonation token for the request virtual path.

System_CAPS_pubmethodHasEntityBody()

Returns a value indicating whether the request contains body data.

System_CAPS_pubmethodHeadersSent()

Returns a value indicating whether HTTP response headers have been sent to the client for the current request.

System_CAPS_pubmethodIsClientConnected()

Returns a value indicating whether the client connection is still active.

System_CAPS_pubmethodIsEntireEntityBodyIsPreloaded()

Returns a value indicating whether all request data is available and no further reads from the client are required.

System_CAPS_pubmethodIsSecure()

Returns a value indicating whether the connection uses SSL.

System_CAPS_pubmethodMapPath(String)

Returns the physical path corresponding to the specified virtual path.

System_CAPS_protmethodMemberwiseClone()

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

System_CAPS_pubmethodReadEntityBody(Byte[], Int32)

Reads request data from the client (when not preloaded).

System_CAPS_pubmethodReadEntityBody(Byte[], Int32, Int32)

Reads request data from the client (when not preloaded) by using the specified buffer to read from, byte offset, and maximum bytes.

System_CAPS_pubmethodSendCalculatedContentLength(Int32)

Adds a Content-Length HTTP header to the response for message bodies that are less than or equal to 2 GB.

System_CAPS_pubmethodSendCalculatedContentLength(Int64)

Adds a Content-Length HTTP header to the response for message bodies that are greater than 2 GB.

System_CAPS_pubmethodSendKnownResponseHeader(Int32, String)

Adds a standard HTTP header to the response.

System_CAPS_pubmethodSendResponseFromFile(IntPtr, Int64, Int64)

Adds the contents of the specified file to the response and specifies the starting position in the file and the number of bytes to send.

System_CAPS_pubmethodSendResponseFromFile(String, Int64, Int64)

Adds the contents of the specified file to the response and specifies the starting position in the file and the number of bytes to send.

System_CAPS_pubmethodSendResponseFromMemory(Byte[], Int32)

Adds the specified number of bytes from a byte array to the response.

System_CAPS_pubmethodSendResponseFromMemory(IntPtr, Int32)

Adds the specified number of bytes from a block of memory to the response.

System_CAPS_pubmethodSendStatus(Int32, String)

Specifies the HTTP status code and status description of the response, such as SendStatus(200, "Ok").

System_CAPS_pubmethodSendUnknownResponseHeader(String, String)

Adds a nonstandard HTTP header to the response.

System_CAPS_pubmethodSetEndOfSendNotification(HttpWorkerRequest.EndOfSendNotification, Object)

Registers for an optional notification when all the response data is sent.

System_CAPS_pubmethodToString()

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

NameDescription
System_CAPS_pubfieldSystem_CAPS_staticHeaderAccept

Specifies the index number for the Accept HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderAcceptCharset

Specifies the index number for the Accept-Charset HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderAcceptEncoding

Specifies the index number for the Accept-Encoding HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderAcceptLanguage

Specifies the index number for the Accept-Language HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderAcceptRanges

Specifies the index number for the Accept-Ranges HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderAge

Specifies the index number for the Age HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderAllow

Specifies the index number for the Allow HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderAuthorization

Specifies the index number for the Authorization HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderCacheControl

The index that represents the HTTP Cache-Control HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderConnection

Specifies the index number for the Connection HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderContentEncoding

Specifies the index number for the Content-Encoding HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderContentLanguage

Specifies the index number for the Content-Language HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderContentLength

Specifies the index number for the Content-Length HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderContentLocation

Specifies the index number for the Content-Location HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderContentMd5

Specifies the index number for the Content-MD5 HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderContentRange

Specifies the index number for the Content-Range HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderContentType

Specifies the index number for the Content-Type HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderCookie

Specifies the index number for the Cookie HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderDate

Specifies the index number for the Date HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderEtag

Specifies the index number for the ETag HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderExpect

Specifies the index number for the Except HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderExpires

Specifies the index number for the Expires HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderFrom

Specifies the index number for the From HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderHost

Specifies the index number for the Host HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderIfMatch

Specifies the index number for the If-Match HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderIfModifiedSince

Specifies the index number for the If-Modified-Since HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderIfNoneMatch

Specifies the index number for the If-None-Match HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderIfRange

Specifies the index number for the If-Range HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderIfUnmodifiedSince

Specifies the index number for the If-Unmodified-Since HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderKeepAlive

Specifies the index number for the Keep-Alive HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderLastModified

Specifies the index number for the Last-Modified HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderLocation

Specifies the index number for the Location HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderMaxForwards

Specifies the index number for the Max-Forwards HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderPragma

Specifies the index number for the Pragma HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderProxyAuthenticate

Specifies the index number for the Proxy-Authenticate HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderProxyAuthorization

Specifies the index number for the Proxy-Authorization HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderRange

Specifies the index number for the Range HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderReferer

Specifies the index number for the Referer HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderRetryAfter

Specifies the index number for the Retry-After HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderServer

Specifies the index number for the Server HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderSetCookie

Specifies the index number for the Set-Cookie HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderTe

Specifies the index number for the TE HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderTrailer

Specifies the index number for the Trailer HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderTransferEncoding

Specifies the index number for the Transfer-Encoding HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderUpgrade

Specifies the index number for the Upgrade HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderUserAgent

Specifies the index number for the User-Agent HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderVary

Specifies the index number for the Vary HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderVia

Specifies the index number for the Via HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderWarning

Specifies the index number for the Warning HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticHeaderWwwAuthenticate

Specifies the index number for the WWW-Authenticate HTTP header.

System_CAPS_pubfieldSystem_CAPS_staticReasonCachePolicy

This API supports the product infrastructure and is not intended to be used directly from your code. Specifies a reason for the request.

System_CAPS_pubfieldSystem_CAPS_staticReasonCacheSecurity

This API supports the product infrastructure and is not intended to be used directly from your code. Specifies a reason for the request.

System_CAPS_pubfieldSystem_CAPS_staticReasonClientDisconnect

This API supports the product infrastructure and is not intended to be used directly from your code. Specifies a reason for the request.

System_CAPS_pubfieldSystem_CAPS_staticReasonDefault

This API supports the product infrastructure and is not intended to be used directly from your code. Specifies a reason for the request. The default value is ReasonResponseCacheMiss.

System_CAPS_pubfieldSystem_CAPS_staticReasonFileHandleCacheMiss

This API supports the product infrastructure and is not intended to be used directly from your code. Specifies a reason for the request.

System_CAPS_pubfieldSystem_CAPS_staticReasonResponseCacheMiss

This API supports the product infrastructure and is not intended to be used directly from your code. Specifies a reason for the request.

System_CAPS_pubfieldSystem_CAPS_staticRequestHeaderMaximum

Specifies the index number for the Maximum HTTP request header.

System_CAPS_pubfieldSystem_CAPS_staticResponseHeaderMaximum

Specifies the index number for the Maximum HTTP response header.

In most cases, your code will not deal with HttpWorkerRequest directly because request and response data are exposed through the HttpRequest and HttpResponse classes. Some internal ASP.NET classes extend this class. If your code implements its own hosting environment, it will need to extend this class to call the ProcessRequest method. In addition, your code could create a derived class for the purpose of child-request execution within a given application in order to pass its instance to ProcessRequest. In this case, the derived class should keep a reference to the current HttpWorkerRequest and delegate most of the methods to it.

.NET Framework
Available since 1.1

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