FederatedMessageSecurityOverHttp.NegotiateServiceCredential 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
指定訊息層級 SSL 交涉是否完成,以取得服務憑證。
public:
property bool NegotiateServiceCredential { bool get(); void set(bool value); };
public bool NegotiateServiceCredential { get; set; }
member this.NegotiateServiceCredential : bool with get, set
Public Property NegotiateServiceCredential As Boolean
屬性值
如果服務憑證已交涉則為 true
,如果服務憑證可超出範圍取得則為 false
。 預設為 true
。
範例
下列程式碼示範如何從繫結存取這個屬性並加以設定。
// This method creates a WSFederationHttpBinding.
public static WSFederationHttpBinding
CreateWSFederationHttpBinding(bool isClient)
{
// Create an instance of the WSFederationHttpBinding.
WSFederationHttpBinding b = new WSFederationHttpBinding();
// Set the security mode to Message.
b.Security.Mode = WSFederationHttpSecurityMode.Message;
// Set the Algorithm Suite to Basic256Rsa15.
b.Security.Message.AlgorithmSuite = SecurityAlgorithmSuite.Basic256Rsa15;
// Set NegotiateServiceCredential to true.
b.Security.Message.NegotiateServiceCredential = true;
' This method creates a WSFederationHttpBinding.
Public Shared Function CreateWSFederationHttpBinding(ByVal isClient As Boolean) As WSFederationHttpBinding
' Create an instance of the WSFederationHttpBinding.
Dim b As New WSFederationHttpBinding()
' Set the security mode to Message.
b.Security.Mode = WSFederationHttpSecurityMode.Message
' Set the Algorithm Suite to Basic256Rsa15.
b.Security.Message.AlgorithmSuite = SecurityAlgorithmSuite.Basic256Rsa15
' Set NegotiateServiceCredential to true.
b.Security.Message.NegotiateServiceCredential = True
備註
此屬性表示用戶端與服務之間是否自動交涉服務憑證。 如果此屬性為 true
,則會發生此種交涉。 如果此屬性為 false
,則與服務通訊前,必須在用戶端指定服務憑證。
服務一定要指定憑證。
如果此屬性為 true,則在要求安全性權杖服務 (以 IssuerAddress 與 IssuerBinding 屬性,或 LocalIssuerAddress 與 LocalIssuerBinding 屬性指定) 發出安全性權杖之前,會先進行服務憑證的訊息層級 SSL 交涉。