1

コンソール アプリケーションを使用して接続する残りの WCF サービスがあります。コンソール アプリがファイルをダウンロードします。小さなファイルは問題なく動作します。大きなファイルの場合、次のエラーが表示されます。

The maximum message size quota for incoming messages (65536) has been exceeded. 
To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element

これは、クライアント側のコンソール アプリの構成ファイルです。

<configuration>     
<system.serviceModel>
    <bindings>
      <webHttpBinding>
        <binding maxReceivedMessageSize="2000000"
                  maxBufferSize="2000000">
          <readerQuotas maxStringContentLength="2000000"/>
        </binding>
      </webHttpBinding>
    </bindings>
    </system.serviceModel>
</configuration>

WCF 構成は次のとおりです。

    <webHttpBinding>
        <binding name="MyTestBinding" maxReceivedMessageSize="10000000" maxBufferPoolSize="10000000" maxBufferSize="10000000" transferMode="Buffered">
            <readerQuotas maxDepth="10000000" maxArrayLength="10000000" maxBytesPerRead="10000000" maxNameTableCharCount="10000000" maxStringContentLength="10000000" />
            <security mode="Transport">
                <transport clientCredentialType="None" />
            </security>
        </binding>
    </webHttpBinding>

WebChannelFactory を使用してサービスに接続しています。何が間違っている可能性がありますか?

4

1 に答える 1