1

我的 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>
4

0 回答 0