WebHttpSecurityMode WebHttpSecurityMode WebHttpSecurityMode WebHttpSecurityMode Enum

定义

定义可用于将服务终结点配置为接收 HTTP 请求的安全模式。Defines the modes of security that can be used to configure a service endpoint to receive HTTP requests.

public enum class WebHttpSecurityMode
public enum WebHttpSecurityMode
type WebHttpSecurityMode = 
Public Enum WebHttpSecurityMode
继承
WebHttpSecurityModeWebHttpSecurityModeWebHttpSecurityModeWebHttpSecurityMode

字段

None None None None 0

指示 HTTP 请求未使用任何安全性。Indicates no security is used with HTTP requests.

Transport Transport Transport Transport 1

指示 HTTP 请求使用传输级安全性。Indicates that transport-level security is used with HTTP requests.

TransportCredentialOnly TransportCredentialOnly TransportCredentialOnly TransportCredentialOnly 2

指示仅提供基于 HTTP 的客户端身份验证。Indicates that only HTTP-based client authentication is provided.

注解

使用此枚举指定采用 WebHttpBinding 配置为接受 HTTP 请求的终结点是否使用传输级安全性。Use this enumeration to specify whether transport-level security is used by an endpoint configured with a WebHttpBinding to receive HTTP requests. 默认值为 "无", 表示不使用安全性。The default value is None, which indicates that no security is used.

如果传输值由WebHttpBinding(WebHttpSecurityMode)指定, 则Transport属性提供的设置将对服务终结点有效。If the Transport value is specified by the WebHttpBinding(WebHttpSecurityMode), then the settings provided by the Transport property become effective for the service endpoint. WebHttpSecurityMode 的值只能在将其作为显式参数的 WebHttpBinding 构造函数中设置,并且在创建绑定实例之后无法再次设置其值。The value of WebHttpSecurityMode can only be set in the WebHttpBinding constructor that takes it as an explicit parameter and its value cannot be set again after the binding instance is created.

TransportCredentialOnly 不提供消息完整性和机密性。TransportCredentialOnly does not provide message integrity and confidentiality. 而是仅提供基于 HTTP 的客户端身份验证。It provides HTTP-based client authentication only. 使用此模式时应当小心。This mode should be used with caution. 它应该用于 IPSec 等环境中, 其中的传输安全通过其他方式提供, 并且仅由 Windows Communication Foundation (WCF) 基础结构提供客户端身份验证。It should be used in environments, such at IPSec, where the transport security is being provided by other means and only client authentication is provided by the Windows Communication Foundation (WCF) infrastructure.

适用于