次の方法で共有


<basicHttpBinding> の <transport>

HTTP トランスポートの認証パラメーターを制御するプロパティを定義します。

スキーマの階層

<system.serviceModel>
  <bindings>
    <basicHttpBinding>
      <binding>
        <basicHttpBinding> の <security>
          <basicHttpBinding> の <transport>

構文

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

属性と要素

以降のセクションでは、属性、子要素、および親要素について説明します。

属性

属性 説明

clientCredentialType

  • HTTP 認証を使用してクライアント認証を実行するときに使用される資格情報の種類を指定します。既定値は None です。この属性は HttpClientCredentialType 型です。

proxyCredentialType

  • HTTP 経由のプロキシを使用してドメイン内からクライアント認証を実行するときに使用される資格情報の種類を指定します。この属性は、親 security 要素の mode 属性が Transport または TransportCredentialsOnly の場合にだけ適用されます。この属性は HttpProxyCredentialType 型です。

realm

ダイジェストまたは基本認証の HTTP 認証方式によって使用されるレルムを指定する文字列。既定値は空の文字列です。

policyEnforcement

この列挙体は、ExtendedProtectionPolicy を適用するタイミングを指定します。

  1. Never – ポリシーが適用されることはありません (拡張保護は無効になります)。

  2. WhenSupported – ポリシーが適用されるのは、クライアントが拡張保護をサポートしている場合のみです。

  3. Always – ポリシーは常に適用されます。拡張保護をサポートしていないクライアントは認証に失敗します。

protectionScenario

この列挙体は、ポリシーによって適用される保護シナリオを指定します。

子要素

なし

親要素

要素 説明

<basicHttpBinding> の <security>

<basicHttpBinding>のセキュリティ機能を定義します。

基本的なバインディングを使用した SSL トランスポート セキュリティの使用例を次に示します。既定で、基本的なバインディングは HTTP 通信をサポートします。

<system.serviceModel>
   <services>
      <service 
          type="Microsoft.ServiceModel.Samples.CalculatorService"
          behaviorConfiguration="CalculatorServiceBehavior">
         <endpoint address=""
               binding="basicHttpBinding"
               bindingConfiguration="Binding1" 
               contract="Microsoft.ServiceModel.Samples.ICalculator" />
      </service>
   </services>
    <bindings>
        <basicHttpBinding>
        <!-- Configure basicHttpBinding with Transport security -- >
        <!-- mode and clientCredentialType set to None.-->
           <binding name="Binding1">
               <security mode="Transport">
                   <transport clientCredentialType="None"
                              proxyCredentialType="None">
                       <extendedProtectionPolicy
                          policyEnforcement="WhenSupported"
                          protectionScenario="TransportSelected">
                    <customServiceNames></customServiceNames>
                       </extendedProtectionPolicy>
               </security>
           </binding>
        </basicHttpBinding>
    </bindings>
</system.serviceModel>

参照

リファレンス

Transport
Transport
HttpTransportSecurityElement
HttpTransportSecurity

概念

<binding>

その他のリソース

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