HttpWorkerRequest Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
[<System.Runtime.InteropServices.ComVisible(false)>]
type HttpWorkerRequest = class
Public MustInherit Class HttpWorkerRequest
- Inheritance
-
HttpWorkerRequest
- 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() |
Initializes a new instance of the HttpWorkerRequest class. |
Fields
HeaderAccept |
Specifies the index number for the |
HeaderAcceptCharset |
Specifies the index number for the |
HeaderAcceptEncoding |
Specifies the index number for the |
HeaderAcceptLanguage |
Specifies the index number for the |
HeaderAcceptRanges |
Specifies the index number for the |
HeaderAge |
Specifies the index number for the |
HeaderAllow |
Specifies the index number for the |
HeaderAuthorization |
Specifies the index number for the |
HeaderCacheControl |
The index that represents the HTTP |
HeaderConnection |
Specifies the index number for the |
HeaderContentEncoding |
Specifies the index number for the |
HeaderContentLanguage |
Specifies the index number for the |
HeaderContentLength |
Specifies the index number for the |
HeaderContentLocation |
Specifies the index number for the |
HeaderContentMd5 |
Specifies the index number for the |
HeaderContentRange |
Specifies the index number for the |
HeaderContentType |
Specifies the index number for the |
HeaderCookie |
Specifies the index number for the |
HeaderDate |
Specifies the index number for the |
HeaderEtag |
Specifies the index number for the |
HeaderExpect |
Specifies the index number for the |
HeaderExpires |
Specifies the index number for the |
HeaderFrom |
Specifies the index number for the |
HeaderHost |
Specifies the index number for the |
HeaderIfMatch |
Specifies the index number for the |
HeaderIfModifiedSince |
Specifies the index number for the |
HeaderIfNoneMatch |
Specifies the index number for the |
HeaderIfRange |
Specifies the index number for the |
HeaderIfUnmodifiedSince |
Specifies the index number for the |
HeaderKeepAlive |
Specifies the index number for the |
HeaderLastModified |
Specifies the index number for the |
HeaderLocation |
Specifies the index number for the |
HeaderMaxForwards |
Specifies the index number for the |
HeaderPragma |
Specifies the index number for the |
HeaderProxyAuthenticate |
Specifies the index number for the |
HeaderProxyAuthorization |
Specifies the index number for the |
HeaderRange |
Specifies the index number for the |
HeaderReferer |
Specifies the index number for the |
HeaderRetryAfter |
Specifies the index number for the |
HeaderServer |
Specifies the index number for the |
HeaderSetCookie |
Specifies the index number for the |
HeaderTe |
Specifies the index number for the |
HeaderTrailer |
Specifies the index number for the |
HeaderTransferEncoding |
Specifies the index number for the |
HeaderUpgrade |
Specifies the index number for the |
HeaderUserAgent |
Specifies the index number for the |
HeaderVary |
Specifies the index number for the |
HeaderVia |
Specifies the index number for the |
HeaderWarning |
Specifies the index number for the |
HeaderWwwAuthenticate |
Specifies the index number for the |
ReasonCachePolicy |
Specifies a reason for the request. |
ReasonCacheSecurity |
Specifies a reason for the request. |
ReasonClientDisconnect |
Specifies a reason for the request. |
ReasonDefault |
Specifies a reason for the request. The default value is ReasonResponseCacheMiss. |
ReasonFileHandleCacheMiss |
Specifies a reason for the request. |
ReasonResponseCacheMiss |
Specifies a reason for the request. |
RequestHeaderMaximum |
Specifies the index number for the |
ResponseHeaderMaximum |
Specifies the index number for the |
Properties
MachineConfigPath |
Gets the full physical path to the Machine.config file. |
MachineInstallDirectory |
Gets the physical path to the directory where the ASP.NET binaries are installed. |
RequestTraceIdentifier |
Gets the corresponding Event Tracking for Windows trace ID for the current request. |
RootWebConfigPath |
Gets the full physical path to the root Web.config file. |
SupportsAsyncFlush |
Gets a value that indicates whether asynchronous flush operations are supported. |
SupportsAsyncRead |
Gets a value that indicates whether asynchronous read operations are supported. |
Methods
BeginFlush(AsyncCallback, Object) |
Sends the currently buffered response to the client. |
BeginRead(Byte[], Int32, Int32, AsyncCallback, Object) |
Begins an asynchronous read operation of the request entity body. |
CloseConnection() |
Terminates the connection with the client. |
EndFlush(IAsyncResult) |
Waits for the pending asynchronous flush operation to complete. |
EndOfRequest() |
Used by the runtime to notify the HttpWorkerRequest that request processing for the current request is complete. |
EndRead(IAsyncResult) |
Waits for the pending asynchronous read operation to complete. |
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
FlushResponse(Boolean) |
Sends all pending response data to the client. |
GetAppPath() |
Returns the virtual path to the currently executing server application. |
GetAppPathTranslated() |
Returns the physical path to the currently executing server application. |
GetAppPoolID() |
When overridden in a derived class, returns the application pool ID for the current URL. |
GetBytesRead() |
Gets the number of bytes read in from the client. |
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() |
Gets the certificate issuer, in binary format. |
GetClientCertificateEncoding() |
When overridden in a derived class, returns the Encoding object in which the client certificate was encoded. |
GetClientCertificatePublicKey() |
When overridden in a derived class, gets a |
GetClientCertificateValidFrom() |
When overridden in a derived class, gets the date when the certificate becomes valid. The date varies with international settings. |
GetClientCertificateValidUntil() |
Gets the certificate expiration date. |
GetConnectionID() |
When overridden in a derived class, returns the ID of the current connection. |
GetFilePath() |
When overridden in a derived class, returns the virtual path to the requested URI. |
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() |
Serves as the default hash function. (Inherited from Object) |
GetHttpVerbName() |
Returns the specified member of the request header. |
GetHttpVersion() |
Provides access to the HTTP version of the request (for example, "HTTP/1.1"). |
GetKnownRequestHeader(Int32) |
Returns the standard HTTP request header that corresponds to the specified index. |
GetKnownRequestHeaderIndex(String) |
Returns the index number of the specified HTTP request header. |
GetKnownRequestHeaderName(Int32) |
Returns the name of the specified HTTP request header. |
GetKnownResponseHeaderIndex(String) |
Returns the index number of the specified HTTP response header. |
GetKnownResponseHeaderName(Int32) |
Returns the name of the specified HTTP response header. |
GetLocalAddress() |
Provides access to the specified member of the request header. |
GetLocalPort() |
Provides access to the specified member of the request header. |
GetPathInfo() |
Returns additional path information for a resource with a URL extension. That is, for the path /virdir/page.html/tail, the |
GetPreloadedEntityBody() |
Returns the portion of the HTTP request body that has already been read. |
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() |
Gets the length of the portion of the HTTP request body that has currently been read. |
GetProtocol() |
When overridden in a derived class, returns the HTTP protocol (HTTP or HTTPS). |
GetQueryString() |
Returns the query string specified in the request URL. |
GetQueryStringRawBytes() |
When overridden in a derived class, returns the response query string as an array of bytes. |
GetRawUrl() |
Returns the URL path contained in the request header with the query string appended. |
GetRemoteAddress() |
Provides access to the specified member of the request header. |
GetRemoteName() |
When overridden in a derived class, returns the name of the client computer. |
GetRemotePort() |
Provides access to the specified member of the request header. |
GetRequestReason() |
When overridden in a derived class, returns the reason for the request. |
GetServerName() |
When overridden in a derived class, returns the name of the local server. |
GetServerVariable(String) |
Returns a single server variable from a dictionary of server variables associated with the request. |
GetStatusDescription(Int32) |
Returns a string that describes the name of the specified HTTP status code. |
GetTotalEntityBodyLength() |
Gets the length of the entire HTTP request body. |
GetType() |
Gets the Type of the current instance. (Inherited from Object) |
GetUnknownRequestHeader(String) |
Returns a nonstandard HTTP request header value. |
GetUnknownRequestHeaders() |
Get all nonstandard HTTP header name-value pairs. |
GetUriPath() |
Returns the virtual path to the requested URI. |
GetUrlContextID() |
When overridden in a derived class, returns the context ID of the current connection. |
GetUserToken() |
When overridden in a derived class, returns the client's impersonation token. |
GetVirtualPathToken() |
Gets the impersonation token for the request virtual path. |
HasEntityBody() |
Returns a value indicating whether the request contains body data. |
HeadersSent() |
Returns a value indicating whether HTTP response headers have been sent to the client for the current request. |
IsClientConnected() |
Returns a value indicating whether the client connection is still active. |
IsEntireEntityBodyIsPreloaded() |
Returns a value indicating whether all request data is available and no further reads from the client are required. |
IsSecure() |
Returns a value indicating whether the connection uses SSL. |
MapPath(String) |
Returns the physical path corresponding to the specified virtual path. |
MemberwiseClone() |
Creates a shallow copy of the current Object. (Inherited from Object) |
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. |
ReadEntityBody(Byte[], Int32) |
Reads request data from the client (when not preloaded). |
SendCalculatedContentLength(Int32) |
Adds a |
SendCalculatedContentLength(Int64) |
Adds a |
SendKnownResponseHeader(Int32, String) |
Adds a standard HTTP header to the response. |
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) |
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) |
Adds the specified number of bytes from a byte array to the response. |
SendResponseFromMemory(IntPtr, Int32) |
Adds the specified number of bytes from a block of memory to the response. |
SendStatus(Int32, String) |
Specifies the HTTP status code and status description of the response, such as |
SendUnknownResponseHeader(String, String) |
Adds a nonstandard HTTP header to the response. |
SetEndOfSendNotification(HttpWorkerRequest+EndOfSendNotification, Object) |
Registers for an optional notification when all the response data is sent. |
ToString() |
Returns a string that represents the current object. (Inherited from Object) |