共用方式為


BasicHttpMessageSecurity 類別

定義

設定 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 類別的新執行個體。

屬性

AlgorithmSuite

指定和 BasicHttpMessageSecurity一起使用的演算法套件。

ClientCredentialType

指定用戶端要加以驗證的認證型別。

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
ShouldSerializeAlgorithmSuite()

傳回要用於保護 SOAP 層級之訊息的演算法套件是否應該序列化。

ShouldSerializeClientCredentialType()

傳回用戶端認證類型是否應該序列化。

ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

適用於