WSHttpBinding WSHttpBinding WSHttpBinding WSHttpBinding Constructors

Definition

Overloads

WSHttpBinding() WSHttpBinding() WSHttpBinding()

Initializes a new instance of the WSHttpBinding class.

WSHttpBinding(SecurityMode) WSHttpBinding(SecurityMode) WSHttpBinding(SecurityMode)

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

WSHttpBinding(String) WSHttpBinding(String) WSHttpBinding(String) WSHttpBinding(String)

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

WSHttpBinding(SecurityMode, Boolean) WSHttpBinding(SecurityMode, Boolean) WSHttpBinding(SecurityMode, Boolean)

Initializes a new instance of the WSHttpBinding class with a specified type of security used by the binding and a value that indicates whether a reliable session is enabled.

WSHttpBinding() WSHttpBinding() WSHttpBinding()

Initializes a new instance of the WSHttpBinding class.

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

Examples

The following sample code shows how to initialize a new instance of the WSHttpBinding class.

WSHttpBinding binding = new WSHttpBinding();
binding.Name = "binding1";
binding.HostNameComparisonMode = HostNameComparisonMode.StrongWildcard;
binding.Security.Mode = SecurityMode.Message;
binding.ReliableSession.Enabled = false;
binding.TransactionFlow = false;
Dim binding As New WSHttpBinding()
With binding
    .Name = "binding1"
    .HostNameComparisonMode = HostNameComparisonMode.StrongWildcard
    .Security.Mode = SecurityMode.Message
    .ReliableSession.Enabled = False
    .TransactionFlow = False
End With

WSHttpBinding(SecurityMode) WSHttpBinding(SecurityMode) WSHttpBinding(SecurityMode)

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

public:
 WSHttpBinding(System::ServiceModel::SecurityMode securityMode);
public WSHttpBinding (System.ServiceModel.SecurityMode securityMode);
new System.ServiceModel.WSHttpBinding : System.ServiceModel.SecurityMode -> System.ServiceModel.WSHttpBinding

Parameters

securityMode
SecurityMode SecurityMode SecurityMode SecurityMode

The value of SecurityMode that specifies the type of security that is used with the SOAP message and for the client.

Examples

The following example shows how to initialize a new instance of the WSHttpBinding class with a securityMode parameter.

// The security mode is set to Message.
WSHttpBinding binding = new WSHttpBinding(SecurityMode.Message);
binding.Security.Message.ClientCredentialType = MessageCredentialType.Windows;
return binding;
' The security mode is set to Message.
Dim binding As New WSHttpBinding(SecurityMode.Message)
binding.Security.Message.ClientCredentialType = MessageCredentialType.Windows
Return binding

WSHttpBinding(String) WSHttpBinding(String) WSHttpBinding(String) WSHttpBinding(String)

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

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

Parameters

configName
String String String String

The binding configuration name for the WSHttpBindingElement.

Exceptions

Examples

The following example shows how to initialize a new instance of the WSHttpBinding class with a string argument.

// Set the IssuerBinding to a WSHttpBinding loaded from config
b.Security.Message.IssuerBinding = new WSHttpBinding("Issuer");
' Set the IssuerBinding to a WSHttpBinding loaded from config
b.Security.Message.IssuerBinding = New WSHttpBinding("Issuer")

WSHttpBinding(SecurityMode, Boolean) WSHttpBinding(SecurityMode, Boolean) WSHttpBinding(SecurityMode, Boolean)

Initializes a new instance of the WSHttpBinding class with a specified type of security used by the binding and a value that indicates whether a reliable session is enabled.

public:
 WSHttpBinding(System::ServiceModel::SecurityMode securityMode, bool reliableSessionEnabled);
public WSHttpBinding (System.ServiceModel.SecurityMode securityMode, bool reliableSessionEnabled);
new System.ServiceModel.WSHttpBinding : System.ServiceModel.SecurityMode * bool -> System.ServiceModel.WSHttpBinding

Parameters

securityMode
SecurityMode SecurityMode SecurityMode SecurityMode

The value of SecurityMode that specifies the type of security that is used with the SOAP message and for the client.

reliableSessionEnabled
Boolean Boolean Boolean Boolean

true if a reliable session is enabled; otherwise, false.

Examples

The following example shows how to initialize a new instance of the WSHttpBinding class with a securityMode and reliableSessionEnabled parameter.

// securityMode is Message
// reliableSessionEnabled is true
WSHttpBinding binding = new WSHttpBinding(SecurityMode.Message, true);
binding.Security.Message.ClientCredentialType = MessageCredentialType.Windows;
' securityMode is Message
' reliableSessionEnabled is true
Dim binding As New WSHttpBinding(SecurityMode.Message, True)
binding.Security.Message.ClientCredentialType = MessageCredentialType.Windows

Applies to