System 2.0.0.0 4.0.0.0 System.Object

When a client makes a request to a Uniform Resource Identifier (URI) handled by an object, the provides a object that contains information about the sender, the request, and the response that is sent to the client. The property returns the object that describes the request.

The object contains information about the request, such as the request string, string, and request body data (see the property).

To reply to the request, you must get the associated response using the property.

Describes an incoming HTTP request to an object. This class cannot be inherited.

- Property
  2.0.0.0
  4.0.0.0
  System.String[] To be added.

  The Accept header is a string of space-separated Multipurpose Internet Mail Extensions (MIME) type names (for example, image/jpeg), which indicate the MIME types that the client is prepared to accept and process in a response. The */* entry indicates that the client accepts any MIME type. For a detailed description of the Accept header, see RFC 2616, available at http://www.rfc-editor.org.

  For a complete list of request headers, see the enumeration.

  Gets the MIME types accepted by the client.

- Method
  2.0.0.0
  4.0.0.0
  System.IAsyncResult `` `` To be added.

  Begins an asynchronous request for the client's X.509 v.3 certificate.

  An that indicates the status of the operation.

  An delegate that references the method to invoke when the operation is complete. A user-defined object that contains information about the operation. This object is passed to the callback delegate when the operation completes.
- Property
  2.0.0.0
  4.0.0.0
  System.Int32 To be added.

  This property contains a Windows error code returned by the Secure Channel (Schannel) Security Support Provider Interface (SSPI), which is used to validate the certificate. For more information about SSPI support for Schannel, see "Creating a Secure Connection Using Schannel" in the Security documentation at http://msdn.microsoft.com/library.

  Gets an error code that identifies a problem with the provided by the client.

- Property
  2.0.0.0
  4.0.0.0
  System.Text.Encoding To be added.

  An object can be used to convert byte sequences into character sets (code pages) and characters into byte sequences. This property uses the charset value from the Content-Type header to determine the encoding. If that information is not available, this property returns .

  Gets the content encoding that can be used with data sent with the request

- Property
  2.0.0.0
  4.0.0.0
  System.Int64 To be added.

  The Content-Length header expresses the length, in bytes, of the body data that accompanies the request.

  For a complete list of request headers, see the enumeration.

  Gets the length of the body data included in the request.

- Property
  2.0.0.0
  4.0.0.0
  System.String To be added.

  If a client includes body data in a request, it declares the Multipurpose Internet Mail Extensions (MIME) type of the body data in the Content-Type header. For example, the default MIME type of data returned from a Web form using the POST method is application/x-www-form-urlencoded.

  For a complete list of request headers, see the enumeration and RFC 2616, available at http://www.rfc-editor.org.

  The is null when there is no Content-Type header in the request.

  Gets the MIME type of the body data included in the request.

- Property
  2.0.0.0
  4.0.0.0
  System.Net.CookieCollection To be added.

  A cookie is name/value text data from a Web server that is stored on the local (client) computer.

  Gets the cookies sent with the request.

- Method
  2.0.0.0
  4.0.0.0
  System.Security.Cryptography.X509Certificates.X509Certificate2 `` To be added.

  Ends an asynchronous request for the client's X.509 v.3 certificate.

  The object that is returned when the operation started.

  The pending request for the certificate.
- Method
  2.0.0.0
  4.0.0.0
  System.Security.Cryptography.X509Certificates.X509Certificate2

  This method blocks until the certificate is retrieved.

  Retrieves the client's X.509 v.3 certificate.

  A object that contains the client's X.509 v.3 certificate.

- Method
  4.0.0.0
  System.Threading.Tasks.Task<System.Security.Cryptography.X509Certificates.X509Certificate2>

  This operation will not block. The returned object will complete when the certificate has been retrieved.

  If a call to this method to retrieve the client's X.509 v.3 certificate is in progress, then another call to this method cannot be made.

  Retrieves the client's X.509 v.3 certificate as an asynchronous operation.

  Returns .

  The task object representing the asynchronous operation. The property on the task object returns a object that contains the client's X.509 v.3 certificate.

- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  A request that sends data to the server using the POST method, for example, should have an entity body.

  Gets a value that indicates whether the request has associated body data.

- Property
  2.0.0.0
  4.0.0.0
  System.Collections.Specialized.NameValueCollection To be added.

  Request headers contain metadata information. For example, headers can contain the Uniform Resource Identifier (URI) of the resource that referred the client to the server, the identity of the user agent employed by the client, and the acceptable MIME types for data in the response body.

  For a complete list of request headers, see the enumeration.

  Gets the collection of header name/value pairs sent in the request.

- Property
  2.0.0.0
  4.0.0.0
  System.String To be added.

  The HTTP method is typically GET or POST, depending on the action desired by the client.

  Gets the HTTP method specified by the client.

- Property
  2.0.0.0
  4.0.0.0
  System.IO.Stream To be added.

  If the client transmits data (for example, using the HTTP POST method), the stream returned by this method contains that data.

  Closing the request does not close the stream returned by this property. When you no longer need the stream, you should close it by calling the method.

  Gets a stream that contains the body data sent by the client.

- Property
  2.0.0.0
  4.0.0.0
  System.MonoTODO("Always returns false")
  System.Boolean To be added.

  Your application requests client authentication using the or property.

  Your application does not receive an for requests from clients that are not successfully authenticated.

  Gets a value that indicates whether the client sending this request is authenticated.

- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  Applications can use this property to perform special processing when requests are from the local computer.

  Gets a value that indicates whether the request is sent from the local computer.

- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  To request a secure connection, the client request uses instead of . If the connection cannot be established using SSL, the client receives a that provides information about the error.

  Gets a value that indicates whether the TCP connection used to send the request is using the Secure Sockets Layer (SSL) protocol.

- Property
  4.0.0.0
  System.MonoTODO
  System.Boolean To be added. To be added.

  Gets a value that indicates whether the TCP connection was a WebSocket request.

- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  If an HTTP client and server expect to exchange data multiple times in a short time period, a persistent connection speeds up their communications by allowing them to avoid the overhead required to open and close a TCP connection for each message. For clients using HTTP/1.1, the default value for this property is true.

  Gets a value that indicates whether the client requests a persistent connection.

- Property
  2.0.0.0
  4.0.0.0
  System.Net.IPEndPoint To be added.

  This property is useful when you want to respond to requests based on the way they are addressed.

  Get the server IP address and port number to which the request is directed.

- Property
  2.0.0.0
  4.0.0.0
  System.Version To be added.

  The capabilities of different HTTP versions are specified in the documents available at http://www.rfc-editor.org.

  Gets the HTTP version used by the requesting client.

- Property
  2.0.0.0
  4.0.0.0
  System.Collections.Specialized.NameValueCollection To be added.

  In a URL, the query information is separated from the path information by a question mark (?). Name/value pairs are separated by an equals sign (=). To access the query data as a single string, get the property value from the object returned by .

  Queries without an equal sign (example: http://www.contoso.com/query.htm?Name ) are added to the null key in the .

  Gets the query string included in the request.

- Property
  2.0.0.0
  4.0.0.0
  System.String To be added.

  The raw URL is defined as the part of the URL following the domain information. In the URL string http://www.contoso.com/articles/recent.aspx, the raw URL is /articles/recent.aspx. The raw URL includes the query string, if present.

  To obtain the host and port information, use the property.

  Gets the URL information (without the host and port) requested by the client.

- Property
  2.0.0.0
  4.0.0.0
  System.Net.IPEndPoint To be added. To be added.

  Gets the client IP address and port number from which the request originated.

- Property
  2.0.0.0
  4.0.0.0
  System.MonoTODO("Always returns Guid.Empty")
  System.Guid To be added. To be added.

  Gets the request identifier of the incoming HTTP request.

- Property
  4.0.0.0
  System.MonoTODO
  System.String To be added.

  An application could use the property to perform custom Service Provide Name (SPN) validation.

  Gets the Service Provider Name (SPN) that the client sent on the request.

- Property
  4.0.0.0
  System.Net.TransportContext To be added.

  The property can be used to retrieve the channel binding token (CBT) for an which was sent using HTTPS.

  An application could use the property to perform custom authentication using calls to the native Win32 AcceptSecurityContext function.

  If an application attempts to retrieve the channel binding token (CBT) from this property using the method and the is not , then the will throw . The overrides the method with an internal implementation.

  Gets the for the client request.

- Property
  2.0.0.0
  4.0.0.0
  System.Uri To be added.

  The property allows you to obtain all the information available from a object. If you need to know only the raw text of the URI request, consider using the property instead.

  The property is null if the from the client could not be parsed.

  The property indicates if uses the raw unescaped URI instead of the converted URI where any percent-encoded values are converted and other normalization steps are taken.

  When a instance receives a request through the http.sys service, it creates an instance of the URI string provided by http.sys, and exposes it as the property.

  The http.sys service exposes two request URI strings:

  Raw URI

  Converted URI

  The raw URI is the provided in the request line of a HTTP request:

  GET /path/

  Host: www.contoso.com

  The raw URI provided by http.sys for the request mentioned above, is "/path/". This represents the string following the HTTP verb as it was sent over the network.

  The http.sys service creates a converted URI from the information provided in the request using the URI provided in the HTTP request line and the Host header to determine the origin server the request should be forwarded to. This is done by comparing the information from the request with a set of registered URI prefixes. In order to be able to compare those values, some normalization to the request needs to be done. For the sample above the converted URI would be as follows:

  http://www.contoso.com/path/

  The http.sys service combines the property value and the string in the request line to create a converted URI. In addition, http.sys and the class also do the following:

  Un-escapes all percent encoded values.

  Converts percent-encoded non-ASCII characters into a UTF-16 character representation. Note that UTF-8 and ANSI/DBCS characters are supported as well as Unicode characters (Unicode encoding using the %uXXXX format).

  Executes other normalization steps, like path compression.

  Since the request doesn't contain any information about the encoding used for percent-encoded values, it may not be possible to determine the correct encoding just by parsing the percent-encoded values.

  Therefore http.sys provides two registry keys for modifying the process:

  Registry Key

  Default Value

  Description

  EnableNonUTF8

  1

  If zero, http.sys accepts only UTF-8-encoded URLs.

  If non-zero, http.sys also accepts ANSI-encoded or DBCS-encoded URLs in requests.

  FavorUTF8

  1

  If non-zero, http.sys always tries to decode a URL as UTF-8 first; if that conversion fails and EnableNonUTF8 is non-zero, Http.sys then tries to decode it as ANSI or DBCS.

  If zero (and EnableNonUTF8 is non-zero), http.sys tries to decode it as ANSI or DBCS; if that is not successful, it tries a UTF-8 conversion.

  When receives a request, it uses the converted URI from http.sys as input to the property.

  There is a need for supporting characters besides characters and numbers in URIs. An example is the following URI, which is used to retrieve customer information for customer number "1/3812":

  http://www.contoso.com/Customer('1%2F3812')/

  Note the percent-encoded slash in the Uri (%2F). This is necessary, since in this case the slash character represents data and not a path delimiter.

  Passing the string to Uri constructor will lead to the following URI:

  http://www.contoso.com/Customer('1/3812')/

  Splitting the path into its segments would result in the following elements:

  Customer('1

  3812')

  This is not the intent of the sender of the request.

  If the property is set to false, then when the receives a request, it uses the raw URI instead of the converted URI from http.sys as input to the property.

  Gets the object requested by the client.

- Property
  2.0.0.0
  4.0.0.0
  System.Uri To be added.

  If a client has followed a hyperlink to the requested URI, its request might contain a Referrer header that identifies the URI of the resource that contained the hyperlink.

  Clients can falsify or choose not to present a header. Therefore, while the property can be useful for identifying basic trends in Web traffic; you should not use it as part of an authorization scheme to control access to data.

  For a complete list of request headers, see the enumeration.

  The is null when there is no Referrer header in the request or when the Referrer header is present in the request but does not parse to a valid .

  Gets the Uniform Resource Identifier (URI) of the resource that referred the client to the server.

- Property
  2.0.0.0
  4.0.0.0
  System.String To be added.

  The User-Agent header typically contains text that identifies the name and version number of the software used to generate the request.

  For a complete list of request headers, see the enumeration.

  The is null when there is no User-Agent header in the request.

  Gets the user agent presented by the client.

- Property
  2.0.0.0
  4.0.0.0
  System.String To be added.

  The information returned by this property is also available in the property value.

  Gets the server IP address and port number to which the request is directed.

- Property
  2.0.0.0
  4.0.0.0
  System.String To be added.

  The Host header contains the requested server host name and port number, if specified, separated by a colon (for example, www.contoso.com:8080).

  You can use this property to return different responses depending on the host name specified in the request.

  For a complete list of request headers, see the enumeration.

  Gets the DNS name and, if provided, the port number specified by the client.

- Property
  2.0.0.0
  4.0.0.0
  System.String[] To be added.

  For a detailed description of the Accept-Language header, see RFC 2616 Section 14.4, available at http://www.rfc-editor.org.

  For a complete list of request headers, see the enumeration.

  Gets the natural languages that are preferred for the response.