BasicHttpSecurity 類別

定義

設定 basicHttpBinding 繫結的安全性設定。Configures the security settings of a basicHttpBinding binding.

public ref class BasicHttpSecurity sealed
public sealed class BasicHttpSecurity
type BasicHttpSecurity = class
Public NotInheritable Class BasicHttpSecurity
繼承
BasicHttpSecurity

範例

BasicHttpBinding binding = new BasicHttpBinding();
binding.Name = "binding1";
binding.HostNameComparisonMode = HostNameComparisonMode.StrongWildcard;
binding.Security.Mode = BasicHttpSecurityMode.Message;

BasicHttpSecurity security = binding.Security;
BasicHttpMessageSecurity msgSecurity = security.Message;

BasicHttpSecurityMode secMode = security.Mode;

HttpTransportSecurity transSec = security.Transport;

Console.WriteLine("The message-level security setting is {0}", secMode.ToString());
Console.WriteLine("The transport-level security setting is {0}", transSec.ToString());
Dim binding As BasicHttpBinding = New BasicHttpBinding()
binding.Name = "binding1"
binding.HostNameComparisonMode = HostNameComparisonMode.StrongWildcard
binding.Security.Mode = BasicHttpSecurityMode.Message

Dim security As BasicHttpSecurity = binding.Security
Dim msgSecurity As BasicHttpMessageSecurity = security.Message

Dim secMode As BasicHttpSecurityMode = security.Mode

Dim transSec As HttpTransportSecurity = security.Transport

Console.WriteLine("The message-level security setting is {0}", secMode.ToString())
Console.WriteLine("The transport-level security setting is {0}", transSec.ToString())

建構函式

BasicHttpSecurity()

初始化 BasicHttpSecurity 類別的新執行個體。Initializes a new instance of the BasicHttpSecurity class.

屬性

Message

取得 basicHttpBinding 繫結的訊息層級安全性設定。Gets the message-level security settings for a basicHttpBinding binding.

Mode

取得或設定 basicHttpBinding 繫結的安全性模式。Gets or sets the security mode for a basicHttpBinding binding.

Transport

取得 basicHttpBinding 繫結的傳輸層級安全性設定。Gets the transport-level security settings for a basicHttpBinding binding.

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
ShouldSerializeMessage()

判斷訊息項目是否應該序列化。Determines whether a message element should be serialized.

ShouldSerializeTransport()

判斷傳輸項目是否應該序列化。Determines whether the transport element should be serialized.

ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)

適用於