WebHttpBehavior Class

Enables the Web programming model for a Windows Communication Foundation (WCF) service.

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

public class WebHttpBehavior : IEndpointBehavior

The WebHttpBehavior type exposes the following members.

  NameDescription
Public methodWebHttpBehaviorInitializes a new instance of the WebHttpBehavior class.
Top

  NameDescription
Public propertyAutomaticFormatSelectionEnabledGets or sets a value that determines if automatic format selection is enabled.
Public propertyDefaultBodyStyleGets and sets the default message body style.
Public propertyDefaultOutgoingRequestFormatGets and sets the default outgoing request format.
Public propertyDefaultOutgoingResponseFormatGets and sets the default outgoing response format.
Public propertyFaultExceptionEnabledGets or sets the flag that specifies whether a FaultException is generated when an internal server error (HTTP status code: 500) occurs.
Public propertyHelpEnabledGets or sets a value that determines if the WCF Help page is enabled.
Protected propertyJavascriptCallbackParameterNameGets or sets the JavaScript callback parameter name.
Top

  NameDescription
Public methodAddBindingParametersImplements the AddBindingParameters(ServiceEndpoint, BindingParameterCollection) method to pass data at runtime to bindings to support custom behavior.
Protected methodAddClientErrorInspectorAdds a client error inspector to the specified service endpoint.
Protected methodAddServerErrorHandlersOverride this method to change the way errors that occur on the service are handled.
Public methodApplyClientBehaviorImplements the ApplyClientBehavior(ServiceEndpoint, ClientRuntime) method to support modification or extension of the client across an endpoint.
Public methodApplyDispatchBehaviorImplements the ApplyDispatchBehavior(ServiceEndpoint, EndpointDispatcher) method to support modification or extension of the client across an endpoint.
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Protected methodGetOperationSelectorCreates a new WebHttpDispatchOperationSelector object.
Protected methodGetQueryStringConverterGets the query string converter.
Protected methodGetReplyClientFormatterGets the reply formatter on the client for the specified endpoint and service operation.
Protected methodGetReplyDispatchFormatterGets the reply formatter on the service for the specified endpoint and service operation.
Protected methodGetRequestClientFormatterGets the request formatter on the client for the specified service operation and endpoint.
Protected methodGetRequestDispatchFormatterGets the request formatter on the service for the given service operation and service endpoint.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodValidateConfirms that the endpoint meets the requirements for the Web programming model.
Protected methodValidateBindingEnsures the binding is valid for use with the WCF Web Programming Model.
Top

The WebHttpBehavior behavior, when used in conjunction with the WebHttpBinding binding, enables WCF to expose and access Web style services. WebServiceHost automatically adds this behavior to endpoints that use the WebHttpBinding.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft