Share via


<clientCredentials> 元素的 <windows>

指定要用於代表用戶端的 Windows 認證的設定。

<configuration>
  <system.serviceModel>
    <behaviors>
      <endpointBehaviors>
        <behavior>
          <clientCredentials>
            <windows>

Syntax

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

屬性和項目

下列章節說明屬性、子元素和父元素。

屬性

屬性 描述
allowedImpersonationLevel 設定用戶端與伺服器通訊的模擬喜好設定。 用戶端選取的模擬模式不會在伺服器上強制使用。 有效值如下:

- Identification:伺服器可取得用戶端的身分識別與權限,但無法模擬用戶端。
- Impersonation:伺服器可在本機系統上模擬用戶端的資訊安全內容。
- Delegation:伺服器可在遠端系統上模擬用戶端的資訊安全內容。
- Anonymous:伺服器無法模擬或識別用戶端。
- None:未指派模擬等級。

預設為 Identification。 此屬性的型別為 TokenImpersonationLevel
allowNtlm 將這個屬性設定為 true 時,如果 Kerberos 無法使用,會允許驗證降級為 NTLM。

將這個屬性設定為 false,可以讓 Windows Communication Foundation (WCF) 在使用 NTLM 時能夠盡力擲回例外狀況。 請注意,將此屬性設為 false,不一定能夠禁止 NTLM 認證透過網路傳送。

子元素

無。

父項目

元素 描述
<clientCredentials> 指定用來對服務驗證用戶端的認證。

另請參閱