在调用webservice返回数据的时候,?出现以下错误:
已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性
这个就需要在调用webservice的解决方案中,在web.config或者app.config中配置一下:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="Service1Soap" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://10.0.0.7:6003/Service1.asmx"
binding="basicHttpBinding"
bindingConfiguration="Service1Soap" contract="gdcService.Service1Soap"
name="Service1Soap" />
</client>
</system.serviceModel>
</configuration>
时间: 2024-12-21 18:42:32