数据请求太大导致错误
WCF配置文件节添加以下2个节点,客户端和服务端配置文件都是需要添加
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IStockCheckService"
closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00"
sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false"
hostNameComparisonMode="StrongWildcard" maxBufferSize="2147483647"
maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<services>
<service name="BeautySalon.BeautySalonWcfService.GoodsService.StockCheckService">
<endpoint binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IStockCheckService"
contract="BeautySalon.BeautySalonWcfService.GoodsService.IStockCheckService" />
</service>
</services>
参考:http://blog.csdn.net/xinqinglhj/article/details/17718785