Click to Rate and Give Feedback
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
HttpResponseMessageProperty Class

Provides access to the HTTP response in order to access and respond to the additional information made available for requests over the HTTP protocol.

Namespace:  System.ServiceModel.Channels
Assembly:  System.ServiceModel (in System.ServiceModel.dll)
Visual Basic (Declaration)
Public NotInheritable Class HttpResponseMessageProperty
Visual Basic (Usage)
Dim instance As HttpResponseMessageProperty
C#
public sealed class HttpResponseMessageProperty
Visual C++
public ref class HttpResponseMessageProperty sealed
JScript
public final class HttpResponseMessageProperty

This is a general-purpose class that gives you direct access to the HTTP response information, which could be used for encapsulation of HTTP-specific information. One use of this class is to support services implemented in accordance with the Representational State Transfer (REST) architecture.

This class enables you to support the following scenarios:

  • Controls whether an entity body is transmitted.

  • Allows HTTP header (key, value) pairs to be set for each response.

  • Varies the status code and status description used for each response.

This class can be used by HttpTransportBindingElement and related classes.

This shows how to use create an instance of the HttpResponseProperty class and modify some of its members:

C#
        HttpResponseMessageProperty responseProperty =
            new HttpResponseMessageProperty();
        responseProperty.StatusCode = HttpStatusCode.OK;
        responseProperty.Headers.Add(
                         HttpResponseHeader.ContentType,
                         "text/html; charset=UTF-8");

System..::.Object
  System.ServiceModel.Channels..::.HttpResponseMessageProperty
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows Vista, Windows XP SP2, Windows Server 2003, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0

.NET Compact Framework

Supported in: 3.5
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker