数据请求太大导致错误
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
本文介绍如何通过调整WCF服务的配置来解决大数据请求时出现的错误问题,包括修改maxBufferSize、maxReceivedMessageSize等参数的具体设置。
 Request Entity Too Large。&spm=1001.2101.3001.5002&articleId=51283535&d=1&t=3&u=4168d1d65c5d4c619238cf9dd50d58fe)
4688

被折叠的 条评论
为什么被折叠?



