HttpWorkerRequest HttpWorkerRequest HttpWorkerRequest HttpWorkerRequest Class

Definition

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

public ref class HttpWorkerRequest abstract
[System.Runtime.InteropServices.ComVisible(false)]
public abstract class HttpWorkerRequest
type HttpWorkerRequest = class
Public MustInherit Class HttpWorkerRequest
Inheritance
HttpWorkerRequestHttpWorkerRequestHttpWorkerRequestHttpWorkerRequest
Derived
Attributes

Remarks

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.

Constructors

HttpWorkerRequest() HttpWorkerRequest() HttpWorkerRequest() HttpWorkerRequest()

Initializes a new instance of the HttpWorkerRequest class.

Fields

HeaderAccept HeaderAccept HeaderAccept HeaderAccept

Specifies the index number for the Accept HTTP header.

HeaderAcceptCharset HeaderAcceptCharset HeaderAcceptCharset HeaderAcceptCharset

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

HeaderAcceptEncoding HeaderAcceptEncoding HeaderAcceptEncoding HeaderAcceptEncoding

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

HeaderAcceptLanguage HeaderAcceptLanguage HeaderAcceptLanguage HeaderAcceptLanguage

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

HeaderAcceptRanges HeaderAcceptRanges HeaderAcceptRanges HeaderAcceptRanges

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

HeaderAge HeaderAge HeaderAge HeaderAge

Specifies the index number for the Age HTTP header.

HeaderAllow HeaderAllow HeaderAllow HeaderAllow

Specifies the index number for the Allow HTTP header.

HeaderAuthorization HeaderAuthorization HeaderAuthorization HeaderAuthorization

Specifies the index number for the Authorization HTTP header.

HeaderCacheControl HeaderCacheControl HeaderCacheControl HeaderCacheControl

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

HeaderConnection HeaderConnection HeaderConnection HeaderConnection

Specifies the index number for the Connection HTTP header.

HeaderContentEncoding HeaderContentEncoding HeaderContentEncoding HeaderContentEncoding

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

HeaderContentLanguage HeaderContentLanguage HeaderContentLanguage HeaderContentLanguage

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

HeaderContentLength HeaderContentLength HeaderContentLength HeaderContentLength

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

HeaderContentLocation HeaderContentLocation HeaderContentLocation HeaderContentLocation

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

HeaderContentMd5 HeaderContentMd5 HeaderContentMd5 HeaderContentMd5

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

HeaderContentRange HeaderContentRange HeaderContentRange HeaderContentRange

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

HeaderContentType HeaderContentType HeaderContentType HeaderContentType

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

HeaderCookie HeaderCookie HeaderCookie HeaderCookie

Specifies the index number for the Cookie HTTP header.

HeaderDate HeaderDate HeaderDate HeaderDate

Specifies the index number for the Date HTTP header.

HeaderEtag HeaderEtag HeaderEtag HeaderEtag

Specifies the index number for the ETag HTTP header.

HeaderExpect HeaderExpect HeaderExpect HeaderExpect

Specifies the index number for the Except HTTP header.

HeaderExpires HeaderExpires HeaderExpires HeaderExpires

Specifies the index number for the Expires HTTP header.

HeaderFrom HeaderFrom HeaderFrom HeaderFrom

Specifies the index number for the From HTTP header.

HeaderHost HeaderHost HeaderHost HeaderHost

Specifies the index number for the Host HTTP header.

HeaderIfMatch HeaderIfMatch HeaderIfMatch HeaderIfMatch

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

HeaderIfModifiedSince HeaderIfModifiedSince HeaderIfModifiedSince HeaderIfModifiedSince

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

HeaderIfNoneMatch HeaderIfNoneMatch HeaderIfNoneMatch HeaderIfNoneMatch

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

HeaderIfRange HeaderIfRange HeaderIfRange HeaderIfRange

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

HeaderIfUnmodifiedSince HeaderIfUnmodifiedSince HeaderIfUnmodifiedSince HeaderIfUnmodifiedSince

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

HeaderKeepAlive HeaderKeepAlive HeaderKeepAlive HeaderKeepAlive

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

HeaderLastModified HeaderLastModified HeaderLastModified HeaderLastModified

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

HeaderLocation HeaderLocation HeaderLocation HeaderLocation

Specifies the index number for the Location HTTP header.

HeaderMaxForwards HeaderMaxForwards HeaderMaxForwards HeaderMaxForwards

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

HeaderPragma HeaderPragma HeaderPragma HeaderPragma

Specifies the index number for the Pragma HTTP header.

HeaderProxyAuthenticate HeaderProxyAuthenticate HeaderProxyAuthenticate HeaderProxyAuthenticate

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

HeaderProxyAuthorization HeaderProxyAuthorization HeaderProxyAuthorization HeaderProxyAuthorization

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

HeaderRange HeaderRange HeaderRange HeaderRange

Specifies the index number for the Range HTTP header.

HeaderReferer HeaderReferer HeaderReferer HeaderReferer

Specifies the index number for the Referer HTTP header.

HeaderRetryAfter HeaderRetryAfter HeaderRetryAfter HeaderRetryAfter

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

HeaderServer HeaderServer HeaderServer HeaderServer

Specifies the index number for the Server HTTP header.

HeaderSetCookie HeaderSetCookie HeaderSetCookie HeaderSetCookie

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

HeaderTe HeaderTe HeaderTe HeaderTe

Specifies the index number for the TE HTTP header.

HeaderTrailer HeaderTrailer HeaderTrailer HeaderTrailer

Specifies the index number for the Trailer HTTP header.

HeaderTransferEncoding HeaderTransferEncoding HeaderTransferEncoding HeaderTransferEncoding

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

HeaderUpgrade HeaderUpgrade HeaderUpgrade HeaderUpgrade

Specifies the index number for the Upgrade HTTP header.

HeaderUserAgent HeaderUserAgent HeaderUserAgent HeaderUserAgent

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

HeaderVary HeaderVary HeaderVary HeaderVary

Specifies the index number for the Vary HTTP header.

HeaderVia HeaderVia HeaderVia HeaderVia

Specifies the index number for the Via HTTP header.

HeaderWarning HeaderWarning HeaderWarning HeaderWarning

Specifies the index number for the Warning HTTP header.

HeaderWwwAuthenticate HeaderWwwAuthenticate HeaderWwwAuthenticate HeaderWwwAuthenticate

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

ReasonCachePolicy ReasonCachePolicy ReasonCachePolicy ReasonCachePolicy

Specifies a reason for the request.

ReasonCacheSecurity ReasonCacheSecurity ReasonCacheSecurity ReasonCacheSecurity

Specifies a reason for the request.

ReasonClientDisconnect ReasonClientDisconnect ReasonClientDisconnect ReasonClientDisconnect

Specifies a reason for the request.

ReasonDefault ReasonDefault ReasonDefault ReasonDefault

Specifies a reason for the request. The default value is ReasonResponseCacheMiss.

ReasonFileHandleCacheMiss ReasonFileHandleCacheMiss ReasonFileHandleCacheMiss ReasonFileHandleCacheMiss

Specifies a reason for the request.

ReasonResponseCacheMiss ReasonResponseCacheMiss ReasonResponseCacheMiss ReasonResponseCacheMiss

Specifies a reason for the request.

RequestHeaderMaximum RequestHeaderMaximum RequestHeaderMaximum RequestHeaderMaximum

Specifies the index number for the Maximum HTTP request header.

ResponseHeaderMaximum ResponseHeaderMaximum ResponseHeaderMaximum ResponseHeaderMaximum

Specifies the index number for the Maximum HTTP response header.

Properties

MachineConfigPath MachineConfigPath MachineConfigPath MachineConfigPath

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

MachineInstallDirectory MachineInstallDirectory MachineInstallDirectory MachineInstallDirectory

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

RequestTraceIdentifier RequestTraceIdentifier RequestTraceIdentifier RequestTraceIdentifier

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

RootWebConfigPath RootWebConfigPath RootWebConfigPath RootWebConfigPath

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

SupportsAsyncFlush SupportsAsyncFlush SupportsAsyncFlush SupportsAsyncFlush

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

SupportsAsyncRead SupportsAsyncRead SupportsAsyncRead SupportsAsyncRead

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

Methods

BeginFlush(AsyncCallback, Object) BeginFlush(AsyncCallback, Object) BeginFlush(AsyncCallback, Object) BeginFlush(AsyncCallback, Object)

Sends the currently buffered response to the client.

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

Begins an asynchronous read operation of the request entity body.

CloseConnection() CloseConnection() CloseConnection() CloseConnection()

Terminates the connection with the client.

EndFlush(IAsyncResult) EndFlush(IAsyncResult) EndFlush(IAsyncResult) EndFlush(IAsyncResult)

Waits for the pending asynchronous flush operation to complete.

EndOfRequest() EndOfRequest() EndOfRequest() EndOfRequest()

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

EndRead(IAsyncResult) EndRead(IAsyncResult) EndRead(IAsyncResult) EndRead(IAsyncResult)

Waits for the pending asynchronous read operation to complete.

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

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

(Inherited from Object)
FlushResponse(Boolean) FlushResponse(Boolean) FlushResponse(Boolean) FlushResponse(Boolean)

Sends all pending response data to the client.

GetAppPath() GetAppPath() GetAppPath() GetAppPath()

Returns the virtual path to the currently executing server application.

GetAppPathTranslated() GetAppPathTranslated() GetAppPathTranslated() GetAppPathTranslated()

Returns the physical path to the currently executing server application.

GetAppPoolID() GetAppPoolID() GetAppPoolID() GetAppPoolID()

When overridden in a derived class, returns the application pool ID for the current URL.

GetBytesRead() GetBytesRead() GetBytesRead() GetBytesRead()

Gets the number of bytes read in from the client.

GetClientCertificate() GetClientCertificate() GetClientCertificate() GetClientCertificate()

When overridden in a derived class, gets the certification fields (specified in the X.509 standard) from a request issued by the client.

GetClientCertificateBinaryIssuer() GetClientCertificateBinaryIssuer() GetClientCertificateBinaryIssuer() GetClientCertificateBinaryIssuer()

Gets the certificate issuer, in binary format.

GetClientCertificateEncoding() GetClientCertificateEncoding() GetClientCertificateEncoding() GetClientCertificateEncoding()

When overridden in a derived class, returns the Encoding object in which the client certificate was encoded.

GetClientCertificatePublicKey() GetClientCertificatePublicKey() GetClientCertificatePublicKey() GetClientCertificatePublicKey()

When overridden in a derived class, gets a PublicKey object associated with the client certificate.

GetClientCertificateValidFrom() GetClientCertificateValidFrom() GetClientCertificateValidFrom() GetClientCertificateValidFrom()

When overridden in a derived class, gets the date when the certificate becomes valid. The date varies with international settings.

GetClientCertificateValidUntil() GetClientCertificateValidUntil() GetClientCertificateValidUntil() GetClientCertificateValidUntil()

Gets the certificate expiration date.

GetConnectionID() GetConnectionID() GetConnectionID() GetConnectionID()

When overridden in a derived class, returns the ID of the current connection.

GetFilePath() GetFilePath() GetFilePath() GetFilePath()

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

GetFilePathTranslated() GetFilePathTranslated() GetFilePathTranslated() GetFilePathTranslated()

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

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

Serves as the default hash function.

(Inherited from Object)
GetHttpVerbName() GetHttpVerbName() GetHttpVerbName() GetHttpVerbName()

Returns the specified member of the request header.

GetHttpVersion() GetHttpVersion() GetHttpVersion() GetHttpVersion()

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

GetKnownRequestHeader(Int32) GetKnownRequestHeader(Int32) GetKnownRequestHeader(Int32) GetKnownRequestHeader(Int32)

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

GetKnownRequestHeaderIndex(String) GetKnownRequestHeaderIndex(String) GetKnownRequestHeaderIndex(String) GetKnownRequestHeaderIndex(String)

Returns the index number of the specified HTTP request header.

GetKnownRequestHeaderName(Int32) GetKnownRequestHeaderName(Int32) GetKnownRequestHeaderName(Int32) GetKnownRequestHeaderName(Int32)

Returns the name of the specified HTTP request header.

GetKnownResponseHeaderIndex(String) GetKnownResponseHeaderIndex(String) GetKnownResponseHeaderIndex(String) GetKnownResponseHeaderIndex(String)

Returns the index number of the specified HTTP response header.

GetKnownResponseHeaderName(Int32) GetKnownResponseHeaderName(Int32) GetKnownResponseHeaderName(Int32) GetKnownResponseHeaderName(Int32)

Returns the name of the specified HTTP response header.

GetLocalAddress() GetLocalAddress() GetLocalAddress() GetLocalAddress()

Provides access to the specified member of the request header.

GetLocalPort() GetLocalPort() GetLocalPort() GetLocalPort()

Provides access to the specified member of the request header.

GetPathInfo() GetPathInfo() GetPathInfo() GetPathInfo()

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.

GetPreloadedEntityBody() GetPreloadedEntityBody() GetPreloadedEntityBody() GetPreloadedEntityBody()

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

GetPreloadedEntityBody(Byte[], Int32) GetPreloadedEntityBody(Byte[], Int32) GetPreloadedEntityBody(Byte[], Int32) GetPreloadedEntityBody(Byte[], Int32)

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

GetPreloadedEntityBodyLength() GetPreloadedEntityBodyLength() GetPreloadedEntityBodyLength() GetPreloadedEntityBodyLength()

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

GetProtocol() GetProtocol() GetProtocol() GetProtocol()

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

GetQueryString() GetQueryString() GetQueryString() GetQueryString()

Returns the query string specified in the request URL.

GetQueryStringRawBytes() GetQueryStringRawBytes() GetQueryStringRawBytes() GetQueryStringRawBytes()

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

GetRawUrl() GetRawUrl() GetRawUrl() GetRawUrl()

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

GetRemoteAddress() GetRemoteAddress() GetRemoteAddress() GetRemoteAddress()

Provides access to the specified member of the request header.

GetRemoteName() GetRemoteName() GetRemoteName() GetRemoteName()

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

GetRemotePort() GetRemotePort() GetRemotePort() GetRemotePort()

Provides access to the specified member of the request header.

GetRequestReason() GetRequestReason() GetRequestReason() GetRequestReason()

When overridden in a derived class, returns the reason for the request.

GetServerName() GetServerName() GetServerName() GetServerName()

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

GetServerVariable(String) GetServerVariable(String) GetServerVariable(String) GetServerVariable(String)

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

GetStatusDescription(Int32) GetStatusDescription(Int32) GetStatusDescription(Int32) GetStatusDescription(Int32)

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

GetTotalEntityBodyLength() GetTotalEntityBodyLength() GetTotalEntityBodyLength() GetTotalEntityBodyLength()

Gets the length of the entire HTTP request body.

GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
GetUnknownRequestHeader(String) GetUnknownRequestHeader(String) GetUnknownRequestHeader(String) GetUnknownRequestHeader(String)

Returns a nonstandard HTTP request header value.

GetUnknownRequestHeaders() GetUnknownRequestHeaders() GetUnknownRequestHeaders() GetUnknownRequestHeaders()

Get all nonstandard HTTP header name-value pairs.

GetUriPath() GetUriPath() GetUriPath() GetUriPath()

Returns the virtual path to the requested URI.

GetUrlContextID() GetUrlContextID() GetUrlContextID() GetUrlContextID()

When overridden in a derived class, returns the context ID of the current connection.

GetUserToken() GetUserToken() GetUserToken() GetUserToken()

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

GetVirtualPathToken() GetVirtualPathToken() GetVirtualPathToken() GetVirtualPathToken()

Gets the impersonation token for the request virtual path.

HasEntityBody() HasEntityBody() HasEntityBody() HasEntityBody()

Returns a value indicating whether the request contains body data.

HeadersSent() HeadersSent() HeadersSent() HeadersSent()

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

IsClientConnected() IsClientConnected() IsClientConnected() IsClientConnected()

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

IsEntireEntityBodyIsPreloaded() IsEntireEntityBodyIsPreloaded() IsEntireEntityBodyIsPreloaded() IsEntireEntityBodyIsPreloaded()

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

IsSecure() IsSecure() IsSecure() IsSecure()

Returns a value indicating whether the connection uses SSL.

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

Returns the physical path corresponding to the specified virtual path.

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

Creates a shallow copy of the current Object.

(Inherited from Object)
ReadEntityBody(Byte[], Int32) ReadEntityBody(Byte[], Int32) ReadEntityBody(Byte[], Int32) ReadEntityBody(Byte[], Int32)

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

ReadEntityBody(Byte[], Int32, Int32) ReadEntityBody(Byte[], Int32, Int32) ReadEntityBody(Byte[], Int32, Int32) ReadEntityBody(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.

SendCalculatedContentLength(Int32) SendCalculatedContentLength(Int32) SendCalculatedContentLength(Int32) SendCalculatedContentLength(Int32)

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

SendCalculatedContentLength(Int64) SendCalculatedContentLength(Int64) SendCalculatedContentLength(Int64) SendCalculatedContentLength(Int64)

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

SendKnownResponseHeader(Int32, String) SendKnownResponseHeader(Int32, String) SendKnownResponseHeader(Int32, String) SendKnownResponseHeader(Int32, String)

Adds a standard HTTP header to the response.

SendResponseFromFile(IntPtr, Int64, Int64) SendResponseFromFile(IntPtr, Int64, Int64) SendResponseFromFile(IntPtr, Int64, Int64) SendResponseFromFile(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.

SendResponseFromFile(String, Int64, Int64) SendResponseFromFile(String, Int64, Int64) SendResponseFromFile(String, Int64, Int64) SendResponseFromFile(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.

SendResponseFromMemory(Byte[], Int32) SendResponseFromMemory(Byte[], Int32) SendResponseFromMemory(Byte[], Int32) SendResponseFromMemory(Byte[], Int32)

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

SendResponseFromMemory(IntPtr, Int32) SendResponseFromMemory(IntPtr, Int32) SendResponseFromMemory(IntPtr, Int32) SendResponseFromMemory(IntPtr, Int32)

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

SendStatus(Int32, String) SendStatus(Int32, String) SendStatus(Int32, String) SendStatus(Int32, String)

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

SendUnknownResponseHeader(String, String) SendUnknownResponseHeader(String, String) SendUnknownResponseHeader(String, String) SendUnknownResponseHeader(String, String)

Adds a nonstandard HTTP header to the response.

SetEndOfSendNotification(HttpWorkerRequest+EndOfSendNotification, Object) SetEndOfSendNotification(HttpWorkerRequest+EndOfSendNotification, Object) SetEndOfSendNotification(HttpWorkerRequest+EndOfSendNotification, Object) SetEndOfSendNotification(HttpWorkerRequest+EndOfSendNotification, Object)

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

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

Returns a string that represents the current object.

(Inherited from Object)

Applies to

See Also