1

maxStringContentLength を 8192 より大きい値に変更する必要がありますが、成功していません。私の WCF サービスは、受信するデータの量が 8192 バイトを超える場合、例外を生成します。検索を使い果たしましたが、何も役に立たないようです。例外はサーバーから発生することを指摘しておく必要があります。サーバー上の WCF から直接生成された例外が表示されるため、クライアントのことは忘れてください。これが私のweb.config設定です:

<?xml version="1.0"?>
<configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.0"/>
  </system.web>
  <system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpGetEnabled="true"/>
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <bindings>
      <basicHttpBinding>
        <binding name="defaultBinding">
          <readerQuotas maxStringContentLength="1048576" />
        </binding>
      </basicHttpBinding>
    </bindings>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
  </system.serviceModel>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>
</configuration>
4

0 に答える 0