System 2.0.0.0 4.0.0.0 System.Object

This class provides the information related to a client's Hypertext Transfer Protocol (HTTP) request being processed by an object. This class also has methods that allow an object to accept a WebSocket connection.

The method returns instances of the class. To get the object that represents the client request, use the property. To get the object that represents the response that will be sent to the client by the , use the property. To get user information about the client sending the request, such as its login name and whether it has been authenticated, you can query the properties in the object returned by the property.

Closing an object sends the response to the client and frees any resources used by the . Aborting an object discards the response to the client if it has not already been sent, and frees any resources used by the . After closing or aborting an object, you cannot reference its methods or properties. If you do so, you will receive an exception.

Provides access to the request and response objects used by the class. This class cannot be inherited.

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

  If you close this , it will send the response to the client, close the that contains the response, and close the object returned by this property.

  Gets the that represents a client's request for a resource.

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

  Your application configures the response by setting properties in the object returned by this property. After configuring the response, you send it to the client by closing the response, or by closing this object.

  Gets the object that will be sent to the client in response to the client's request.

- Property
  2.0.0.0
  4.0.0.0
  System.Security.Principal.IPrincipal To be added.

  An indicates that it requires authentication using the property or by specifying an delegate using the property.

  To determine the client's login name and authentication information, check the property in the object returned by this property.

  Gets an object used to obtain identity, authentication information, and security roles for the client whose request is represented by this object.