[Bug]The maximum array length quota (16384) has been exceeded while reading XML data.
2015-01-11 10:56
543 查看
写在前面
在项目中,有客户反应无法正常加载组织结构树,弄了一个测试的程序,在日志中查看到如下信息:Error in deserializing body of reply message for operation 'GetDepartMentList'. The maximum array length quota (16384) has been exceeded while reading XML data. This quota may be increased by changing the MaxArrayLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 1, position 23793.
解决办法
上面那句话的意思大概是,在读取xml数据的时候超出了定额长度。而这个加载组织结构树的代码是采用wcf进行加载的,然后就想到了可以在客户端的配置文件中进行尝试。修改如下:
<system.serviceModel> <bindings> <basicHttpBinding> <binding name="OrganizationService" maxReceivedMessageSize="1024000000" maxBufferSize="1024000000"> <readerQuotas maxArrayLength="1024000000"/> </binding> </basicHttpBinding> </bindings> <client> <endpoint address="http://98.87.118.114:6001/OrganizationService.svc/OrganizationService" binding="basicHttpBinding" bindingConfiguration="OrganizationService" contract="OrganizationService.IOrganizationService" name="OrganizationService" /> </client> </system.serviceModel>
问题到此解决。
相关文章推荐
- 调用WebServiceWebService提示The maximum string content length quota (8192) has been exceeded while reading XML data的解决办法
- The maximum string content length quota (8192) has been exceeded while reading XML data
- WCF:The maximum string content length quota (8192) has been exceeded while reading XML data
- The maximum string content length quota (8192) has been exceeded while reading XML data
- The maximum string content length quota (8192) has been exceeded while reading XML data
- WCF常见异常-The maximum string content length quota (8192) has been exceeded while reading XML data
- The maximum message size quota for incoming messages (65536) has been exceeded.
- WCF错误"The maximum message size quota for incoming messages (65536) has been exceeded."
- Web Service调用出现:The maximum message size quota for incoming messages (65536) has been exceeded....错误
- Maximum message size quota for incoming messages (65536) has been exceeded.已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceive
- WebService出错 Maximum message size quota for incoming messages (65536) has been exceeded.已超过传入消息(65536)的最大消息大小配额
- Data Structure Array: Find the Increasing subsequence of length three with maximum product
- WebService出错 Maximum message size quota for incoming messages (65536) has been exceeded.已超过传入消息(65536)的最大消息大小配额
- WebService出错 Maximum message size quota for incoming messages (65536) has been exceeded.已超过传入消息(65536)的最大消息大小配额
- WebService出错 Maximum message size quota for incoming messages (65536) has been exceeded.已超过传入消息(65536)的最大消息大小配额
- Maximum message size quota for incoming messages (65536) has been exceeded.已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceive
- Given a int array, please find the sub array wich has maximum sum, return the index, length and sum
- Maximum message size quota for incoming messages (65536) has been exceeded.
- A fatal error has been detected by the Java Runtime Environment(jdk 1.6的一个BUG)
- JAVA VM bug :A fatal error has been detected by the Java Runtime Environment