我程序运行时,当数据量过大时就报这样一个错误:
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.
我网上找了相关的解决办法配置了config文件如下:
<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>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
    <bindings>
      <basicHttpBinding>
        <binding name="basicHttp" allowCookies="true"  maxReceivedMessageSize="20000000" maxBufferSize="20000000" maxBufferPoolSize="20000000">
          <readerQuotas maxDepth="32" maxArrayLength="200000000" maxStringContentLength="200000000"/>
        </binding>
      </basicHttpBinding>
    </bindings>
    <services>
    <service name="WcfServiceTest.MyServiceTest">
      <endpoint bindingConfiguration="basicHttp" address="" binding="basicHttpBinding" contract="WcfServiceTest.IService1" />
    </service>
    </services>
  </system.serviceModel>
但好像设置没有效果似的.一样报那个错误.望遇到过些问题的朋友们.给点提示.谢谢.