BasicHttpMessageSecurity 類別

定義

設定 BasicHttpBinding{2}的訊息層級安全性組態。Configures message-level security settings for BasicHttpBinding.

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

範例

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

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

SecurityAlgorithmSuite sas = msgSecurity.AlgorithmSuite;
BasicHttpMessageCredentialType credType = msgSecurity.ClientCredentialType;

Console.WriteLine("The algorithm suite used is {0}", sas.ToString());
Console.WriteLine("The client credential type used is {0}", credType.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 sas As SecurityAlgorithmSuite = msgSecurity.AlgorithmSuite
Dim credType As BasicHttpMessageCredentialType = msgSecurity.ClientCredentialType

Console.WriteLine("The algorithm suite used is {0}", sas.ToString())
Console.WriteLine("The client credential type used is {0}", credType.ToString())

建構函式

BasicHttpMessageSecurity()

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

屬性

AlgorithmSuite

指定和 BasicHttpMessageSecurity{2}一起使用的演算法套件。Specifies the algorithm suite to use with BasicHttpMessageSecurity.

ClientCredentialType

指定用戶端要加以驗證的認證型別。Specifies the type of credential with which the client authenticates.

方法

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)
ShouldSerializeAlgorithmSuite()

傳回要用於保護 SOAP 層級之訊息的演算法套件是否應該序列化。Returns whether the algorithm suite to be used for securing messages at the SOAP level should be serialized.

ShouldSerializeClientCredentialType()

傳回用戶端認證類型是否應該序列化。Returns whether the client credential type should be serialized.

ToString()

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

(繼承來源 Object)

適用於