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.

Applies to

Product Introduced

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.

Applies to

Product Introduced

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 securityMode);
public:
 WebHttpBinding(System::ServiceModel::WebHttpSecurityMode mode);
public WebHttpBinding (System.ServiceModel.WebHttpSecurityMode securityMode);
public WebHttpBinding (System.ServiceModel.WebHttpSecurityMode mode);
new System.ServiceModel.WebHttpBinding : System.ServiceModel.WebHttpSecurityMode -> System.ServiceModel.WebHttpBinding
new System.ServiceModel.WebHttpBinding : System.ServiceModel.WebHttpSecurityMode -> System.ServiceModel.WebHttpBinding
Public Sub New (securityMode As WebHttpSecurityMode)
Public Sub New (mode As WebHttpSecurityMode)

Parameters

securityModemode
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

Product Introduced