<wsHttpBinding> 的 <transport>

定义 HTTP 传输的身份验证设置。

架构层次结构

<system.serviceModel>
  <bindings>
    <wsHttpBinding>
      <binding>
        <wsHttpBinding> 的 <security>
          <wsHttpBinding> 的 <transport>

语法

<wsHttpBinding>
    <binding>
        <security mode=”None|Transport|TransportWithMessageCredential|TransportCredentialOnly”>
            <transport
            clientCredentialType="Basic|Certificate|Digest|None|Ntlm|Windows"
            proxyCredentialType="Basic|Digest|None|Ntlm|Windows"
            realm="string" />
                <extendedProtectionPolicy policyEnforcement=”Never|WhenSupported|Always” protectionScenario=”TransportSelected|TrustedProxy”>
                    <customServiceNames></customServiceNames>
                </extendedProtecutionPolicy>
            </transport>
        </security>
    </binding>
</wsHttpBinding>

HttpTransportSecurity

属性和元素

以下几节描述了属性、子元素和父元素。

属性

属性 说明

clientCredentialType

指定用于向服务证明客户端身份的凭据。此属性的类型为 HttpClientCredentialType

proxyCredentialType

指定用于向域代理证明客户端身份的凭据。此属性的类型为 HttpProxyCredentialType

realm

一个字符串,指定摘要式或基本身份验证的身份验证领域。默认值为一个空字符串。

身份验证领域至少指定执行身份验证的主机的名称。它还可以指定具有访问权限的用户的集合。用户可以查询身份验证领域,以确定多个可能的用户名和密码中哪一个可以使用。

policyEnforcement

此枚举指定应何时强制实施 ExtendedProtectionPolicy。

  1. Never – 绝不强制实施此策略(禁用扩展保护)。

  2. WhenSupported – 仅在客户端支持扩展保护时才强制实施此策略。

  3. Always – 总是强制实施此策略。不支持扩展保护的客户端将无法进行身份验证。

子元素

无。

父元素

元素 说明

<wsHttpBinding> 的 <security>

表示 <wsHttpBinding> 的安全功能。

另请参见

参考

HttpTransportSecurity
Transport
Transport
HttpTransportSecurityElement

概念

<binding>

其他资源

Securing Services and Clients
Windows Communication Foundation Bindings
Configuring System-Provided Bindings
Using Bindings to Configure Services and Clients