SecurityBindingElement.CreateAnonymousForCertificateBindingElement 方法

定义

创建一个对称安全绑定元素,配置该元素以进行匿名客户端身份验证以及基于证书的服务器身份验证。

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

返回

容纳新绑定的 SymmetricSecurityBindingElement

示例

下面的代码演示如何调用此方法。

SymmetricSecurityBindingElement b =
    SecurityBindingElement.
    CreateAnonymousForCertificateBindingElement();
Dim b As SymmetricSecurityBindingElement = _
SecurityBindingElement.CreateAnonymousForCertificateBindingElement()

注解

客户端和服务器必须使用服务证书在带外进行配置。

创建绑定时,其 MessageSecurityVersion 设置为 WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11RequireSignatureConfirmation 设置为 true

适用于