Condividi tramite


WebHttpBehavior Class

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Enables the Web programming model for a Silverlight client.

Inheritance Hierarchy

System.Object
  System.ServiceModel.Description.WebHttpBehavior

Namespace:  System.ServiceModel.Description
Assembly:  System.ServiceModel.Web.Extensions (in System.ServiceModel.Web.Extensions.dll)

Syntax

'Declaration
Public Class WebHttpBehavior _
    Implements IEndpointBehavior
public class WebHttpBehavior : IEndpointBehavior

The WebHttpBehavior type exposes the following members.

Constructors

  Name Description
Public method WebHttpBehavior Initializes a new instance of the WebHttpBehavior class.

Top

Properties

  Name Description
Public property DefaultBodyStyle Gets and sets the default message body style.
Public property DefaultOutgoingRequestFormat Gets and sets the default outgoing request format.
Public property DefaultOutgoingResponseFormat Gets and sets the default outgoing response format.
Public property FaultExceptionEnabled Gets or sets the flag that specifies whether a FaultException is generated when an internal server error (HTTP status code: 500) occurs.

Top

Methods

  Name Description
Public method AddBindingParameters This method is not used in Silverlight 5.
Protected method AddClientErrorInspector Adds a client error inspector to the specified client runtime.
Public method ApplyClientBehavior Implements the ApplyClientBehavior(ServiceEndpoint, ClientRuntime) method to support modification or extension of the client across an endpoint.
Public method ApplyDispatchBehavior This method is not used in Silverlight 5.
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Protected method GetQueryStringConverter Gets the query string converter.
Protected method GetReplyClientFormatter Gets the reply formatter on the client for the specified endpoint and service operation.
Protected method GetRequestClientFormatter Gets the request formatter on the client for the specified service operation and endpoint.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method Validate Confirms that the endpoint meets the requirements for the Web programming model.
Protected method ValidateBinding Ensures the binding is valid for use with the Silverlight Web Programming Model.

Top

Remarks

The WebHttpBehavior behavior enables Silverlight to access Web style services. It sets default message body style, outgoing request and response formats, and validates other client behavior concerning contracts used.

Version Information

Silverlight

Supported in: 5, 4

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.