BasicHttpSecurity 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
配置 basicHttpBinding
绑定的安全设置。
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 类的新实例。 |
属性
Message |
获取 |
Mode |
获取或设置 |
Transport |
设置 |
方法
Equals(Object) |
确定指定对象是否等于当前对象。 (继承自 Object) |
GetHashCode() |
作为默认哈希函数。 (继承自 Object) |
GetType() |
获取当前实例的 Type。 (继承自 Object) |
MemberwiseClone() |
创建当前 Object 的浅表副本。 (继承自 Object) |
ShouldSerializeMessage() |
确定是否应序列化消息元素。 |
ShouldSerializeTransport() |
确定是否应序列化传输元素。 |
ToString() |
返回表示当前对象的字符串。 (继承自 Object) |