<clientCredentials> 的 <windows> 元素

指定用于表示客户端的 Windows 凭据的设置。

架构层次结构

<system.serviceModel>
  <behaviors>
    <endpointBehaviors>
      <endpointBehaviors> 的 <behavior>
        <clientCredentials>
          <userNameAuthentication>

语法

<windows 
    allowedImpersonationLevel="Identification/Impersonation/Delegation/Anonymous/None"
        allowNtlm="Boolean"
/>

属性和元素

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

属性

特性 说明

allowedImpersonationLevel

设置客户端用于与服务器进行通信的模拟首选项。服务器上不强制使用客户端所选择的模拟模式。包括以下有效值:

  • Identification:服务器可以获取客户端的标识和特权,但无法模拟客户端。

  • Impersonation:服务器可以在本地系统上模拟客户端的安全上下文。

  • Delegation:服务器可以在远程系统上模拟客户端的安全上下文。

  • Anonymous:服务器无法模拟或标识客户端。

  • None:未指定模拟级别。

默认值为 Identification。此属性的类型为 TokenImpersonationLevel

allowNtlm

如果 Kerberos 不可用,则将此属性设置为 true 可令身份验证降级到 NTLM。

如果使用 NTLM,则将此属性设置为 false 将导致 Windows Communication Foundation (WCF) 尽最大努力引发异常。请注意,将此属性设置为 false 可能不阻止通过网络发送 NTLM 凭据。

子元素

无。

父元素

元素 说明

<clientCredentials>

指定用于向服务证明客户端身份的凭据。

另请参见

参考

WindowsClientElement
ClientCredentialsElement
ClientCredentials
Windows
ClientCredentials
Windows
WindowsClientCredential

其他资源

Securing Clients
Working with Certificates
Securing Services and Clients