共用方式為


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。 預設值是 None

範例

下列範例會取得 Security 屬性。

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

備註

根據預設,SOAP 訊息並不安全,而且用戶端也尚未經過驗證。 若要使用非預設類型的安全性,請使用 BasicHttpBinding(BasicHttpSecurityMode) 建構函式。

適用於