BasicHttpBinding.Security 属性

定义

获取与此绑定一起使用的安全类型。

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

属性值

BasicHttpSecurity

与此绑定一起使用的 BasicHttpSecurity。 默认值是 None

示例

下面的示例获取 Security 属性。

BasicHttpBinding binding = new BasicHttpBinding();
BasicHttpSecurity security = binding.Security;

注解

默认情况下,不会对 SOAP 消息进行保护,也不会对客户端进行身份验证。 若要使用非默认的安全类型,请使用 BasicHttpBinding(BasicHttpSecurityMode) 构造函数。

适用于