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

注解

此属性值确定是否对绑定应用了消息级安全性。

适用于