Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

HttpListenerContext::Response Property

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

Namespace:  System.Net
Assembly:  System (in System.dll)
public:
property HttpListenerResponse^ Response {
	HttpListenerResponse^ get ();
}

Property Value

Type: System.Net::HttpListenerResponse
An HttpListenerResponse object used to send a response back to the client.

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

Notes to Callers

Note: This member outputs trace information when you enable network tracing in your application. For more information, see Network Tracing.

The following code example demonstrates getting the response to a client's request and adding the response body.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.