传入邮件的最大邮件大小限额出错(65536)

时间:2014-06-28 06:22:19

标签: asp.net web-services web-config

我在调用webservice函数时遇到上述错误(例如GetUserInfo)。此函数返回大量数据但不超过65KB我也在我的客户端配置中将maxReceivedMessageSize设置为2000000000。我的配置文件的ServiceModel是:

<system.serviceModel>
<bindings>
  <customBinding>
    <binding name="AAAServerSoap12Binding">
      <textMessageEncoding maxReadPoolSize="2000000000" maxWritePoolSize="2000000000"
        messageVersion="Soap12">
        <readerQuotas maxDepth="32" maxStringContentLength="2000000000"
          maxArrayLength="2000000000" maxBytesPerRead="2000000000"  maxNameTableCharCount="2000000000" />
      </textMessageEncoding>
      <httpTransport maxBufferPoolSize="2000000000" maxReceivedMessageSize="2000000000"
        maxBufferSize="2000000000" />
    </binding>
  </customBinding>
 </bindings>
 <client>
  <endpoint address="http://10.187.110.5:8280/services/AAAServer.AAAServerHttpSoap12Endpoint"
    binding="customBinding" bindingConfiguration="AAAServerSoap12Binding"
    contract="AAAServiceReference.AAAServerPortType" name="AAAServerHttpSoap12Endpoint"  />
</client>
</system.serviceModel>

每当我收到此错误时,我将GetUserInfo的xml结果保存到文件中,该文件为24KB - 50KB),并且永远不会达到65KB或更多。错误是

Server was unable to process request. ---> 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. ---> 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.

感谢

0 个答案:

没有答案
相关问题