WebHttpBinding Constructors

Definition

Initializes a new instance of the WebHttpBinding class.

Overloads

WebHttpBinding()

Initializes a new instance of the WebHttpBinding class.

WebHttpBinding(String)

Initializes a new instance of the WebHttpBinding class with a binding specified by its configuration name.

WebHttpBinding(WebHttpSecurityMode)

Initializes a new instance of the WebHttpBinding class with the type of security used by the binding explicitly specified.

WebHttpBinding()

Initializes a new instance of the WebHttpBinding class.

public:
 WebHttpBinding();
public WebHttpBinding ();
Public Sub New ()

Remarks

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.

WebHttpBinding(String)

Initializes a new instance of the WebHttpBinding class with a binding specified by its configuration name.

public:
 WebHttpBinding(System::String ^ configurationName);
public WebHttpBinding (string configurationName);
new System.ServiceModel.WebHttpBinding : string -> System.ServiceModel.WebHttpBinding
Public Sub New (configurationName As String)

Parameters

configurationName
String

The binding configuration name for the WebHttpBindingElement.

Exceptions

The binding element with the name configurationName was not found.

WebHttpBinding(WebHttpSecurityMode)

Initializes a new instance of the WebHttpBinding class with the type of security used by the binding explicitly specified.

public:
 WebHttpBinding(System::ServiceModel::WebHttpSecurityMode mode);
public WebHttpBinding (System.ServiceModel.WebHttpSecurityMode mode);
new System.ServiceModel.WebHttpBinding : System.ServiceModel.WebHttpSecurityMode -> System.ServiceModel.WebHttpBinding
Public Sub New (mode As WebHttpSecurityMode)

Parameters

securityMode
WebHttpSecurityMode

The value of WebHttpSecurityMode that specifies the type of security that is used to configure a service endpoint to receive HTTP requests.

Exceptions

The securityMode specified is not a valid WebHttpSecurityMode.

Remarks

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.

Applies to