SecurityBindingElement.CreateSecureConversationBindingElement 方法

定義

建立對稱式安全性繫結項目,這個項目則設定為建立用戶端與服務之間的安全對話。 在安全對話交換結束時發出的安全性內容權杖是用來確保這些訊息的安全。

多載

CreateSecureConversationBindingElement(SecurityBindingElement)

建立對稱式安全性繫結項目,這個項目則設定為建立用戶端與服務之間的安全對話。 在安全對話交換結束時發出的安全性內容權杖是用來確保這些訊息的安全。 啟動安裝安全性繫結項目會指定如何保護安全對話交換訊息。

CreateSecureConversationBindingElement(SecurityBindingElement, Boolean)

建立對稱式安全性繫結項目,這個項目則設定為建立用戶端與服務之間的安全對話。 在安全對話交換結束時發出的安全性內容權杖是用來確保這些訊息的安全。

CreateSecureConversationBindingElement(SecurityBindingElement, Boolean, ChannelProtectionRequirements)

建立對稱式安全性繫結項目,這個項目則設定為建立用戶端與服務之間的安全對話。 在安全對話交換結束時發出的安全性內容權杖是用來確保這些訊息的安全。 啟動安裝安全性繫結項目會指定如何保護安全對話交換訊息。

CreateSecureConversationBindingElement(SecurityBindingElement)

Source:
SecurityBindingElement.cs
Source:
SecurityBindingElement.cs
Source:
SecurityBindingElement.cs

建立對稱式安全性繫結項目,這個項目則設定為建立用戶端與服務之間的安全對話。 在安全對話交換結束時發出的安全性內容權杖是用來確保這些訊息的安全。 啟動安裝安全性繫結項目會指定如何保護安全對話交換訊息。

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

參數

bootstrapSecurity
SecurityBindingElement

包含如何保護安全對話信號交換訊息安全之規格的 SecurityBindingElement

傳回

SecurityBindingElement 物件。

例外狀況

bootstrapSecuritynull

備註

此繫結項目已設定為使用工作階段架構安全性內容權杖。

bootstrapSecurity 會用於指出用於向服務要求安全對話權杖的安全性繫結和原則。

如果 bootstrapSecurityTransportSecurityBindingElement,這個方法所傳回的繫結項目也是一樣,且 IncludeTimestamp 設定為 true,而從 LocalClientSecuritySettings 傳回的 LocalClientSettings 物件將它的 DetectReplays 屬性設定為 false;而從 LocalServiceSecuritySettings 傳回的 LocalServiceSettings 物件將它的 DetectReplays 屬性設定為 false

否則會傳回 SymmetricSecurityBindingElement,而且 RequireSignatureConfirmation 設定為 false

適用於

CreateSecureConversationBindingElement(SecurityBindingElement, Boolean)

Source:
SecurityBindingElement.cs
Source:
SecurityBindingElement.cs
Source:
SecurityBindingElement.cs

建立對稱式安全性繫結項目,這個項目則設定為建立用戶端與服務之間的安全對話。 在安全對話交換結束時發出的安全性內容權杖是用來確保這些訊息的安全。

public:
 static System::ServiceModel::Channels::SecurityBindingElement ^ CreateSecureConversationBindingElement(System::ServiceModel::Channels::SecurityBindingElement ^ bootstrapSecurity, bool requireCancellation);
public static System.ServiceModel.Channels.SecurityBindingElement CreateSecureConversationBindingElement (System.ServiceModel.Channels.SecurityBindingElement bootstrapSecurity, bool requireCancellation);
static member CreateSecureConversationBindingElement : System.ServiceModel.Channels.SecurityBindingElement * bool -> System.ServiceModel.Channels.SecurityBindingElement
Public Shared Function CreateSecureConversationBindingElement (bootstrapSecurity As SecurityBindingElement, requireCancellation As Boolean) As SecurityBindingElement

參數

bootstrapSecurity
SecurityBindingElement

包含如何保護安全對話信號交換訊息安全之規格的 SecurityBindingElement

requireCancellation
Boolean

如果必須執行取消作業,則為 true,否則為 false。 將這個參數設定為 false 便會啟用安全性內容權杖 (在 Web 伺服陣列案例中非常有用),因為在這個模式中,工作階段狀態會在建立的安全性內容權杖內部經過編碼,而不是保存在伺服器記憶體內。

傳回

SecurityBindingElement 物件。

例外狀況

bootstrapSecuritynull

範例

下列程式碼將示範如何呼叫這個方法。

SecurityBindingElement security = SecurityBindingElement.CreateMutualCertificateBindingElement();

// Use a secure session.
security = SecurityBindingElement.CreateSecureConversationBindingElement(security, true);

備註

如果 requireCancellationfalse,便會發行 Cookie 架構安全性內容權杖;否則會發行工作階段架構安全性內容權杖。

bootstrapSecurity 會用於指出用於向服務要求 SecureConversationToken 的安全性繫結和原則。

如果 bootstrapSecurityTransportSecurityBindingElement,這個方法傳回的繫結項目也是 TransportSecurityBindingElement,且 IncludeTimestamp 設定為 true;而從 LocalClientSecuritySettings 傳回的 LocalClientSettings 物件將它的 DetectReplays 屬性設定為 false;而從 LocalServiceSecuritySettings 傳回的 LocalServiceSettings 物件將它的 DetectReplays 屬性設定為 false

否則會傳回 SymmetricSecurityBindingElement,而且 RequireSignatureConfirmation 設定為 false

注意

在 Windows XP 上需要模擬時,請使用不含安全性內容權杖的安全會話。 當搭配模擬使用安全性內容權杖時,會擲回 InvalidOperationException。 如需詳細資訊,請參閱 不支援的案例。 如需安全會話的詳細資訊,請參閱 安全會話

適用於

CreateSecureConversationBindingElement(SecurityBindingElement, Boolean, ChannelProtectionRequirements)

Source:
SecurityBindingElement.cs
Source:
SecurityBindingElement.cs
Source:
SecurityBindingElement.cs

建立對稱式安全性繫結項目,這個項目則設定為建立用戶端與服務之間的安全對話。 在安全對話交換結束時發出的安全性內容權杖是用來確保這些訊息的安全。 啟動安裝安全性繫結項目會指定如何保護安全對話交換訊息。

public:
 static System::ServiceModel::Channels::SecurityBindingElement ^ CreateSecureConversationBindingElement(System::ServiceModel::Channels::SecurityBindingElement ^ bootstrapSecurity, bool requireCancellation, System::ServiceModel::Security::ChannelProtectionRequirements ^ bootstrapProtectionRequirements);
public static System.ServiceModel.Channels.SecurityBindingElement CreateSecureConversationBindingElement (System.ServiceModel.Channels.SecurityBindingElement bootstrapSecurity, bool requireCancellation, System.ServiceModel.Security.ChannelProtectionRequirements bootstrapProtectionRequirements);
static member CreateSecureConversationBindingElement : System.ServiceModel.Channels.SecurityBindingElement * bool * System.ServiceModel.Security.ChannelProtectionRequirements -> System.ServiceModel.Channels.SecurityBindingElement
Public Shared Function CreateSecureConversationBindingElement (bootstrapSecurity As SecurityBindingElement, requireCancellation As Boolean, bootstrapProtectionRequirements As ChannelProtectionRequirements) As SecurityBindingElement

參數

bootstrapSecurity
SecurityBindingElement

包含如何保護安全對話信號交換訊息安全之規格的 SecurityBindingElement

requireCancellation
Boolean

如果必須執行取消作業,則為 true,否則為 false。 將這個參數設定為 false 便會啟用安全性內容權杖 (在 Web 伺服陣列案例中非常有用),因為在這個模式中,工作階段狀態會在建立的安全性內容權杖內部經過編碼,而不是保存在伺服器記憶體內。

bootstrapProtectionRequirements
ChannelProtectionRequirements

指定通道保護需求的 ChannelProtectionRequirements 物件。

傳回

SecurityBindingElement 物件。

例外狀況

bootstrapSecuritynull

備註

bootstrapProtectionRequirements 參數會啟用自訂在安全對話交換期間交換之訊息的保護方式。

bootstrapSecurity 會用於指出用於向服務要求安全對話權杖的安全性繫結和原則。

如果 bootstrapSecurityTransportSecurityBindingElement,這個方法傳回的繫結項目也是 TransportSecurityBindingElement,且 IncludeTimestamp 設定為 true;而從 LocalClientSecuritySettings 傳回的 LocalClientSettings 物件將它的 DetectReplays 屬性設定為 false;而從 LocalServiceSecuritySettings 傳回的 LocalServiceSettings 物件將它的 DetectReplays 屬性設定為 false

否則會傳回 SymmetricSecurityBindingElement,而且 RequireSignatureConfirmation 設定為 false

注意

在 Windows XP 上需要模擬時,請使用不含安全性內容權杖的安全會話。 當搭配模擬使用安全性內容權杖時,會擲回 InvalidOperationException。 如需詳細資訊,請參閱 不支援的案例。 如需安全會話的詳細資訊,請參閱 安全會話

適用於