BasicHttpMessageSecurity 类

定义

配置 BasicHttpBinding 的消息级安全性设置。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 一起使用的算法组。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()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)

适用于