Rediger

Del via


SecurityBindingElement.CreateMutualCertificateBindingElement Method

Definition

Creates an asymmetric security binding element that is configured to require certificate-based client authentication as well as certificate-based server authentication.

Overloads

CreateMutualCertificateBindingElement()

Creates an asymmetric security binding element that is configured to require certificate-based client authentication as well as certificate-based server authentication.

CreateMutualCertificateBindingElement(MessageSecurityVersion)

Creates an asymmetric security binding element that is configured to require certificate-based client authentication as well as certificate-based server authentication.

CreateMutualCertificateBindingElement(MessageSecurityVersion, Boolean)

Creates an asymmetric security binding element that is configured to require certificate-based client authentication as well as certificate-based server authentication.

Remarks

The client must be configured with its certificate as well as the server's certificate. The server must be configured with its certificate.

CreateMutualCertificateBindingElement()

Source:
SecurityBindingElement.cs
Source:
SecurityBindingElement.cs

Creates an asymmetric security binding element that is configured to require certificate-based client authentication as well as certificate-based server authentication.

public:
 static System::ServiceModel::Channels::SecurityBindingElement ^ CreateMutualCertificateBindingElement();
public static System.ServiceModel.Channels.SecurityBindingElement CreateMutualCertificateBindingElement ();
static member CreateMutualCertificateBindingElement : unit -> System.ServiceModel.Channels.SecurityBindingElement
Public Shared Function CreateMutualCertificateBindingElement () As SecurityBindingElement

Returns

A SecurityBindingElement object.

Examples

The following code shows how to call this method.

SecurityBindingElement security = SecurityBindingElement.CreateMutualCertificateBindingElement();

Remarks

The binding is configured so that a new random symmetric key (encrypted for the server) is generated for every request by the client and is used to protect the request as well as the response from the server. The client's certificate is used as an endorsing supporting token on the request.

A AsymmetricSecurityBindingElement is actually created.

Applies to

CreateMutualCertificateBindingElement(MessageSecurityVersion)

Source:
SecurityBindingElement.cs
Source:
SecurityBindingElement.cs

Creates an asymmetric security binding element that is configured to require certificate-based client authentication as well as certificate-based server authentication.

public:
 static System::ServiceModel::Channels::SecurityBindingElement ^ CreateMutualCertificateBindingElement(System::ServiceModel::MessageSecurityVersion ^ version);
public static System.ServiceModel.Channels.SecurityBindingElement CreateMutualCertificateBindingElement (System.ServiceModel.MessageSecurityVersion version);
static member CreateMutualCertificateBindingElement : System.ServiceModel.MessageSecurityVersion -> System.ServiceModel.Channels.SecurityBindingElement
Public Shared Function CreateMutualCertificateBindingElement (version As MessageSecurityVersion) As SecurityBindingElement

Parameters

version
MessageSecurityVersion

The message security version.

Returns

A SecurityBindingElement object.

Exceptions

version is null.

Remarks

If the version is WSSecurity10, then the binding element is configured so that the client request is signed by its certificate and encrypted with the server certificate.

If the version is WSSecurity11, then the binding element is configured so that a new random symmetric key (encrypted for the server) is generated for every request by the client and is used to protect the request as well as the response from the server. The client's certificate is used as an endorsing supporting token on the request.

Note

Once a SecurityBindingElement object is created by calling this method, the MessageSecurityVersion property is immutable. Calling set on it does not change it.

Applies to

CreateMutualCertificateBindingElement(MessageSecurityVersion, Boolean)

Source:
SecurityBindingElement.cs
Source:
SecurityBindingElement.cs

Creates an asymmetric security binding element that is configured to require certificate-based client authentication as well as certificate-based server authentication.

public:
 static System::ServiceModel::Channels::SecurityBindingElement ^ CreateMutualCertificateBindingElement(System::ServiceModel::MessageSecurityVersion ^ version, bool allowSerializedSigningTokenOnReply);
public static System.ServiceModel.Channels.SecurityBindingElement CreateMutualCertificateBindingElement (System.ServiceModel.MessageSecurityVersion version, bool allowSerializedSigningTokenOnReply);
static member CreateMutualCertificateBindingElement : System.ServiceModel.MessageSecurityVersion * bool -> System.ServiceModel.Channels.SecurityBindingElement
Public Shared Function CreateMutualCertificateBindingElement (version As MessageSecurityVersion, allowSerializedSigningTokenOnReply As Boolean) As SecurityBindingElement

Parameters

version
MessageSecurityVersion

The message security version.

allowSerializedSigningTokenOnReply
Boolean

true to allow a serialized signing token on the reply; otherwise, false.

Returns

A SecurityBindingElement object.

Exceptions

version is null.

Remarks

The allowSerializedSigningTokenOnReply parameter, when true, enables interoperability with older versions of Web Services Enhancements (WSE).

Note

Once a SecurityBindingElement object is created by calling this method, the MessageSecurityVersion property should be treated as immutable. Inconsistent binding behavior may occur if this value is modified.

Applies to