System 2.0.0.0 4.0.0.0 System.Object System.IDisposable

When a client makes a request for a resource handled by an object, the request and response are made available to your application in an object. The request is represented by an object and is available in the property. The response is represented by an object and is available in the property.

You can customize the response by setting various properties, such as , , and . Use the property to obtain a instance to which response data can be written. Finally, send the response data to the client by calling the method.

Represents a response to a request being handled by an object.

- Method
  2.0.0.0
  4.0.0.0
  System.Void

  Calling this method on an object that has already been closed has no effect. If the response has not already been closed, this method closes it and the associated and objects. The connection to the client is also closed, regardless of the property value of the client request.

  Closes the connection to the client without sending a response.

- Method
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  Calling this method is equivalent to calling the method on the collection returned by the property.

  If the header specified in does not exist, this method inserts a new header into the property's collection. If is present in the collection, this method replaces the existing value with . To add a value to an existing header without replacing the existing value, use the method.

  Adds the specified header and value to the HTTP headers for this response.

  The name of the HTTP header to set. The value for the header.
- Method
  2.0.0.0
  4.0.0.0
  System.Void ``

  Calling this method is equivalent to calling the method on the collection returned by the property.

  If the specified cookie does not exist in the property's collection, is added. If the cookie exists in the collection, replaces it.

  Adds the specified to the collection of cookies for this response.

  The to add to the collection to be sent with this response
- Method
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  Calling this method is equivalent to calling the method on the collection returned by the property.

  If the header specified in does not exist, this method inserts a new header into the property's collection. If is present in the collection, this method adds to the existing values. To replace the value of an existing header, use the method.

  Appends a value to the specified HTTP header to be sent with this response.

  The name of the HTTP header to append to. The value to append to the header.
- Method
  2.0.0.0
  4.0.0.0
  System.Void

  This method closes the response stream and the associated with the response.

  Sends the response to the client and releases the resources held by this instance.

- Method
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  If you are sending body data with the response, you can use this method to send it as a array instead of writing the body data to the property and calling the method.

  This method closes the response stream and the associated with the response.

  Returns the specified byte array to the client and releases the resources held by this instance.

  A array that contains the response to send to the client. true to block execution while flushing the stream to the client; otherwise, false.
- 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.

  Gets or sets the for this response's .

- 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 response's body data. When using a format that is not send the data chunked or raw, you must set the property. If you do not, the does not send the response data.

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

  Gets or sets the number of bytes in the body data included in the response.

- Property
  2.0.0.0
  4.0.0.0
  System.String To be added.

  When communicating with a Web browser, you should explicitly set this property when returning any content type other than text/html.

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

  Gets or sets the MIME type of the content returned.

- 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. The following cookie formats are supported: Netscape, RFC 2109, and RFC 2965. The Netscape cookie specification is available at http://wp.netscape.com/newsref/std/cookie_spec.html; the RFC documents are available at http://www.rfc-editor.org.

  Gets or sets the collection of cookies returned with the response.

- Method
  2.0.0.0
  4.0.0.0
  System.Void ``

  If you regularly change many properties from their default values to a fixed set of new values, it is convenient to use an instance as a template. Customize the template response once and, instead of configuring each response separately, call the method to configure a new response based on property values in the template response.

  The following properties are copied from to the current instance.

  Copies properties from the specified to this response.

  The instance to copy.
- Property
  2.0.0.0
  4.0.0.0
  System.Net.WebHeaderCollection To be added.

  Response headers contain metadata information such as the date and time of the response, the identity of the responding server, and the MIME type of the data contained in the response body.

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

  If you attempt to set a Content-Length, Keep-Alive, Transfer-Encoding, or WWW-Authenticate header using the Headers property, an exception will be thrown. Use the or properties to set these headers. You cannot set the Transfer-Encoding or WWW-Authenticate headers manually.

  Gets or sets the collection of header name/value pairs returned by the server.

- 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 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. Persistent connections are in widespread use in communications between modern Web browsers and Web servers.

  Persistent connections are described in detail in the HTTP/1.1 protocol specification (RFC 2616) available at the RTF Editor Web site (http://www.rfc-editor.org).

  Gets or sets a value indicating whether the server requests a persistent connection.

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

  The property must be set explicitly before writing to the returned object.

  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 Close method.

  Gets a object to which a response can be written.

- 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.ietf.org.

  Gets or sets the HTTP version used for the response.

- Method
  2.0.0.0
  4.0.0.0
  System.Void ``

  The method is used to redirect a client to the new location for a resource. This method sets the response's Location header to , the property to , and the property to "Found".

  Configures the response to redirect the client to the specified URL.

  The URL that the client should use to locate the requested resource.
- Property
  2.0.0.0
  4.0.0.0
  System.String To be added.

  The Location header specifies the URL to which the client is directed to locate a requested resource.

  Setting this property does not automatically set the property.

  Gets or sets the value of the HTTP Location header in this response.

- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  The body of a chunked message is made up of a series of chunks. Each chunk comprises of two parts—the size of the chunk data and the actual data. When set to true the response is sent using chunked transfer encoding.

  Gets or sets whether the response uses chunked transfer encoding.

- Method
  2.0.0.0
  4.0.0.0
  System.Void ``

  Two cookies are considered the same if the values of their , , and properties are the same. If these three pieces of information are the same, the method attempts to update the cookie. The name and domain comparisons are not case sensitive, but the path comparison is case sensitive.

  Adds or updates a in the collection of cookies sent with this response.

  A for this response.
- Property
  2.0.0.0
  4.0.0.0
  System.Int32 To be added.

  Clients use the status code returned by the server to decide how to proceed. A value of indicates that the server successfully processed the client's request and included the requested resource in the response body. Other common status codes include , indicating that the requested resource was not found on the server, and , indicating that it was unnecessary to return the requested resource in the response body because the client's cached copy of the resource is up-to-date.

  For a complete list of possible status codes, see the enumeration.

  Gets or sets the HTTP status code to be returned to the client.

- Property
  2.0.0.0
  4.0.0.0
  System.String To be added.

  The status description typically provides details that explain the value.

  Gets or sets a text description of the HTTP status code returned to the client.

- Method
  2.0.0.0
  4.0.0.0
  System.Void

  Use the method to send the response and release resources held by an . To discard the response and release the resources held by this instance, use the method.

  Releases all resources used by the .