共用方式為


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 設定為 WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11,而 RequireSignatureConfirmation 設定為 true

適用於