WSHttpBinding.Security 属性

定义

获取与此绑定一起使用的安全设置。

public:
 property System::ServiceModel::WSHttpSecurity ^ Security { System::ServiceModel::WSHttpSecurity ^ get(); void set(System::ServiceModel::WSHttpSecurity ^ value); };
public:
 property System::ServiceModel::WSHttpSecurity ^ Security { System::ServiceModel::WSHttpSecurity ^ get(); };
public System.ServiceModel.WSHttpSecurity Security { get; set; }
public System.ServiceModel.WSHttpSecurity Security { get; }
member this.Security : System.ServiceModel.WSHttpSecurity with get, set
member this.Security : System.ServiceModel.WSHttpSecurity
Public Property Security As WSHttpSecurity
Public ReadOnly Property Security As WSHttpSecurity

属性值

WSHttpSecurity

与此绑定一起使用的 WSHttpSecurityMode 属性的默认值为 Message

示例

下面的示例演示如何获取 Security 的值。

WSHttpBinding wsHttpBinding = new WSHttpBinding();
WSHttpSecurity whSecurity = wsHttpBinding.Security;
Dim wsHttpBinding As New WSHttpBinding()
Dim whSecurity As WSHttpSecurity = wsHttpBinding.Security

注解

若要使用非默认的安全类型,请使用 WSHttpBinding(SecurityMode) 构造函数。

适用于