This documentation is archived and is not being maintained.

WebHttpBinding Constructor

Initializes a new instance of the WebHttpBinding class.

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

public WebHttpBinding()

The default security mode is None, which specifies that no security is used.

To use transport-level security for endpoints configured with this binding, the Transport value must be specified as a parameter in the WebHttpBinding(WebHttpSecurityMode) constructor.

To use HTTP authentication without HTTPS, the TransportCredentialOnly value must be specified as a parameter in the WebHttpBinding(WebHttpSecurityMode) constructor.

The value of WebHttpSecurityMode cannot be set again after the binding instance is created.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

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
Show: