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)

适用于