<ws2007HttpBinding>

SecurityReliableSession、および TransactionFlow の各バインディング要素の適切なバージョンをサポートする相互運用可能なバインディングを定義します。

<system.serviceModel>
  <bindings>
    <ws2007HttpBinding>

<ws2007HttpBinding>
    <binding 
        allowCookies="Boolean"
        bypassProxyOnLocal="Boolean"
        closeTimeout="TimeSpan"
        hostNameComparisonMode="StrongWildCard/Exact/WeakWildcard"
        maxBufferPoolSize="integer"
        maxReceivedMessageSize="Integer"
        messageEncoding="Text/Mtom" 
                name="string"
        openTimeout="TimeSpan" 
        proxyAddress="URI"
        receiveTimeout="TimeSpan"
        sendTimeout="TimeSpan"
                
textEncoding="UnicodeFffeTextEncoding/Utf16TextEncoding/Utf8TextEncoding"
        transactionFlow="Boolean"
        useDefaultWebProxy="Boolean">
        <reliableSession ordered="Boolean"
           inactivityTimeout="TimeSpan"
           enabled="Boolean" />
        <security mode="Message/None/Transport/TransportWithCredential">
           <transport clientCredentialType="Basic/Certificate/Digest/None/Ntlm/Windows"
                proxyCredentialType="Basic/Digest/None/Ntlm/Windows"
                realm="string" 
                                />
          <message clientCredentialType ="Certificate/IssuedToken/None/UserName/Windows"
           negotiateServiceCredential="Boolean"
           algorithmSuite="Basic128/Basic192/Basic256/Basic128Rsa15/ Basic256Rsa15/TripleDes/TripleDesRsa15/Basic128Sha256/Basic192Sha256/TripleDesSha256/Basic128Sha256Rsa15/Basic192Sha256Rsa15/Basic256Sha256Rsa15/TripleDesSha256Rsa15"
           establishSecurityContext="Boolean" 
           negotiateServiceCredential="Boolean"/>
        </security>
        <readerQuotas maxDepth="integer" 
           maxStringContentLength="integer"
                      maxArrayLength="integer"
           maxBytesPerRead="integer"
           maxNameTableCharCount="integer" />
    </binding>
</ws2007HttpBinding>

属性および要素

属性

属性 説明

allowCookies

クライアントが Cookie を受け入れて、それらを今後の要求に反映させるかどうかを指定する値です。既定値は false です。

Cookie を使用する ASMX (ASP.NET Web サービス) と対話する場合に、このプロパティを使用できます。これにより、サーバーから返される Cookie が、このサービスに対するそれ以降のすべてのクライアント要求に自動的にコピーされます。

bypassProxyOnLocal

ローカル アドレスでプロキシ サーバーをバイパスするかどうかを示す値です。既定値は false です。

closeTimeout

クローズ操作が完了するまでの期間を指定する TimeSpan 値です。この値は必ず Zero 以上である必要があります。既定値は 00:01:00 です。

hostnameComparisonMode

URI (Uniform Resource Identifier) の解析に使用する HTTP ホスト名比較モードを指定します。この属性は HostnameComparisonMode 型で、URI が一致したときにサービスへのアクセスにホスト名を使用するかどうかを指定します。既定値は StrongWildcard で、一致しているホスト名を無視します。

maxBufferPoolSize

このバインディングに使用するバッファ プールの最大サイズです。既定値は 524,288 バイト (512 × 1,024) です。Windows Communication Foundation (WCF) の多くの部分でバッファが使用されます。使用するたびに毎回バッファを作成および破棄すると負荷が高くなります。バッファのガベージ コレクションも同様です。バッファ プールを使用すると、バッファをプールから取得して使用し、作業が終わったらプールに戻すことができます。これで、バッファの作成と破棄によるオーバーヘッドを回避できます。

maxReceivedMessageSize

このバインディングで構成されたチャネルで受信可能な、ヘッダーを含む最大メッセージ サイズ (バイト単位) です。この制限を超える場合、メッセージの送信者は SOAP エラーを受け取ります。メッセージは受信者によって破棄され、トレース ログにこのイベントのエントリが作成されます。既定値は 65536 です。

messageEncoding

メッセージのエンコードに使用されるエンコーダを定義します。有効な値は次のとおりです。

  • Text: テキスト メッセージ エンコーダを使用します。
  • Mtom: MTOM (Message Transmission Organization Mechanism) 1.0 エンコーダを使用します。

既定値は Text です。

この属性は WSMessageEncoding 型です。

name

バインディングの構成名です。この値は、バインディングの ID として使用されるため、一意にする必要があります。

openTimeout

実行中の操作が完了するまでの時間間隔を指定する TimeSpan 値です。この値は必ず Zero 以上である必要があります。既定値は 00:01:00 です。

proxyAddress

HTTP プロキシのアドレスを指定する URI です。useSystemWebProxytrue の場合、この設定を null にする必要があります。既定値は null です。

receiveTimeout

受信操作が完了するまでの時間間隔を指定する TimeSpan 値です。この値は必ず Zero 以上である必要があります。既定値は 00:01:00 です。

sendTimeout

送信操作が完了するまでの時間間隔を指定する TimeSpan 値です。この値は必ず Zero 以上である必要があります。既定値は 00:01:00 です。

textEncoding

バインディングでメッセージの発行に使用する文字セット エンコーディングを指定します。有効な値は次のとおりです。

  • UnicodeFffeTextEncoding: Unicode ビッグ エンディアン エンコーディング。
  • Utf16TextEncoding: 16 ビット エンコーディング。
  • Utf8TextEncoding: 8 ビット エンコーディング。

既定値は Utf8TextEncoding です。

この属性は Encoding 型です。

transactionFlow

バインディングが、フローする WS-Transactions をサポートするかどうかを指定する値です。既定値は false です。

useDefaultWebProxy

システムの自動設定 HTTP プロキシを使用するかどうかを示す値です。既定値は true です。

子要素

要素 説明

<wsHttpBinding> の <security>

バインディングのセキュリティ設定を定義します。この要素は WSHttpSecurityElement 型です。

<readerQuotas>

このバインディングを使用して設定されるエンドポイントで処理できる、SOAP メッセージの複雑さに対する制約を定義します。この要素は XmlDictionaryReaderQuotasElement 型です。

<reliableSession> 要素

チャネルのエンドポイント間に信頼できるセッションを確立するかどうかを指定します。

親要素

要素 説明

<bindings>

この要素には、標準バインディングおよびカスタム バインディングのコレクションが保持されます。各エントリは、それぞれの name によって識別されます。サービスは、name を使用してバインディングをリンクすることにより、バインディングを使用します。

解説

WS2007HttpBinding は、WSHttpBinding と同様のシステム標準のバインディングを追加しますが、ReliableSession、Security、および TransactionFlow の各プロトコルの OASIS (Organization for the Advancement of Structured Information Standards) 標準バージョンを使用します。このバインディングを使用する場合、オブジェクト モデルや既定の設定を変更する必要はありません。

<configuration>
    <system.ServiceModel>
        <bindings>
            <ws2007HttpBinding>
                <binding name="test"
                    closeTimeout="00:00:10"
                    openTimeout="00:00:20" 
                    receiveTimeout="00:00:30"
                    sendTimeout="00:00:40"
                    bypassProxyOnLocal="false"
                    transactionFlow="false" 
                    hostNameComparisonMode="WeakWildcard"
                    maxMessageSize="1000"
                    messageEncoding="Mtom" 
                    proxyAddress="http://foo/bar"
                    textEncoding="utf-16"
                    useDefaultWebProxy="false">
                    <reliableSession ordered="false"
                         inactivityTimeout="00:02:00"
                         enabled="true" />
                    <security mode="Transport">
                         <transport clientCredentialType="Digest"
                            proxyCredentialType="None"
                            realm="someRealm" />
                         <message clientCredentialType="Windows"
                            negotiateServiceCredential="false"
                            algorithmSuite="Aes128" 
                            defaultProtectionLevel="None" />
                    </security>
                </binding>
           </ws2007HttpBinding>
        </bindings>
    </system.ServiceModel>
</configuration>

関連項目

リファレンス

WS2007HttpBinding
WS2007HttpBindingElement

概念

<binding>

その他の技術情報

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