【发布时间】:2014-03-27 05:43:11
【问题描述】:
我有两个独立的模块(基于 Web 的 GUI 和基于 WCF 的服务器),我正在使用 WCF 服务引用来访问从我的 GUI 到服务器的一些方法。当 GUI 向服务器请求数据并将大量数据发送到 GUI 时,会出现此问题;抛出最大消息大小错误异常! 我在 Web.config 文件的适当部分标记中增加了消息大小,它暂时起作用,但是当数据(在我的情况下总是增长)达到最大允许大小时,错误再次发生!我知道瓶颈在 GUI 一侧! 我该如何解决这个问题,有没有办法让 GUI 服务引用来处理不断增长的数据? 这是我的 GUI web.config 文件:
<pre>
</system.webServer>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IServerHelper" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="16777216" maxBufferPoolSize="524288" maxReceivedMessageSize="16777216" 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>
<client>
<endpoint address="http://172.16.16.7:123456/ServerServices" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IServerHelper" contract="ServiceReference1.IServerHelper" name="BasicHttpBinding_IServerHelper"/>
</client>
</system.serviceModel>
</pre>
谢谢你帮助我...
【问题讨论】: