邮件大小配额

时间:2014-02-28 20:27:04

标签: wcf maxreceivedmessagesize

我的WCF服务在返回大量数据时抛出错误。我正在从WCF测试客户端进行测试,因此没有客户端配置文件。当要求返回较小的数据集时,Invoke正常工作。我已经在这里阅读了关于这个问题的所有帖子,他们都说要做我已经做过的事情。任何帮助将不胜感激。

感谢。

这是我的app.config:

  <system.serviceModel>
    <services>
      <service name="FAPWCF.FAPService">
        <endpoint address="" binding="basicHttpBinding" contract="FAPWCF.IFAPService">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8732/Design_Time_Addresses/FAPWCF/Service1/" />
          </baseAddresses>
        </host>
      </service>
    </services>

    <bindings>
      <basicHttpBinding>
        <binding allowCookies="true" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" maxBufferPoolSize="2147483647">
          <readerQuotas maxDepth="32" maxArrayLength="2147483647" maxStringContentLength="2147483647"/>
        </binding>
      </basicHttpBinding>
    </bindings>

    <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>
  </system.serviceModel>

0 个答案:

没有答案