WSHttpBinding.Security WSHttpBinding.Security WSHttpBinding.Security WSHttpBinding.Security Property

定义

获取与此绑定一起使用的安全设置。Gets the security settings used with this binding.

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

属性值

与此绑定一起使用的 WSHttpSecurityThe WSHttpSecurity that is used with this binding. Mode 属性的默认值为 MessageThe default value Mode property is Message.

示例

下面的示例演示如何获取 Security 的值。The following example shows how to obtain the value of the Security.

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

注解

若要使用非默认的安全类型,请使用 WSHttpBinding(SecurityMode) 构造函数。To use something other than the default security type, use the WSHttpBinding(SecurityMode) constructor.

适用于