共用方式為


WSDualHttpSecurity.Mode 屬性

定義

取得或設定父代 WSDualHttpBinding 的安全性模式。

public:
 property System::ServiceModel::WSDualHttpSecurityMode Mode { System::ServiceModel::WSDualHttpSecurityMode get(); void set(System::ServiceModel::WSDualHttpSecurityMode value); };
public System.ServiceModel.WSDualHttpSecurityMode Mode { get; set; }
member this.Mode : System.ServiceModel.WSDualHttpSecurityMode with get, set
Public Property Mode As WSDualHttpSecurityMode

屬性值

WSDualHttpSecurityMode 列舉中的值。 預設為 Message

例外狀況

範例

下列程式碼將示範如何設定這個屬性。

WSDualHttpBinding binding3 = new WSDualHttpBinding();
binding3.Security.Mode = WSDualHttpSecurityMode.None;
binding3.Security.Message.AlgorithmSuite = SecurityAlgorithmSuite.Basic256;
binding3.MessageEncoding = WSMessageEncoding.Mtom;
Dim binding3 As New WSDualHttpBinding()
binding3.Security.Mode = WSDualHttpSecurityMode.None
binding3.Security.Message.AlgorithmSuite = SecurityAlgorithmSuite.Basic256
binding3.MessageEncoding = WSMessageEncoding.Mtom

備註

此屬性的值判斷訊息層級安全性是否套用至繫結。

適用於