写在前面

在项目中,有客户反应无法正常加载组织结构树,弄了一个测试的程序,在日志中查看到如下信息:

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>

问题到此解决。

[Bug]The maximum array length quota (16384) has been exceeded while reading XML data.的更多相关文章

  1. WCF服务接口多,客户端在引用时出错!报WCF The maximum nametable character count quota (16384) has been exceeded while reading XML data错误

    WCF服务接口多,客户端在引用时出错!报WCF The maximum nametable character count quota (16384) has been exceeded while ...

  2. 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 问题:调用第三 ...

  3. 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 问题场景:在我们W ...

  4. 调用WebServiceWebService提示The maximum string content length quota (8192) has been exceeded while reading XML data的解决办法

    在web.config中,bindings节点下,对应的服务名称中,原本可能是自动折叠的“/>”,需要改成手动折叠的</binding>,然后在中间加上<readerQuota ...

  5. check the element in the array occurs more than half of the array length

    Learn this from stackflow. public class test { public static void main(String[] args) throws IOExcep ...

  6. 缓存 Array.length 是老生常谈的小优化

    问题 缓存 Array.length 是老生常谈的小优化. // 不缓存 for (var i = 0; i < arr.length; i++) { ... } // 缓存 var len = ...

  7. Array.length vs Array.prototype.length

    I found that both the Array Object and Array.prototype have the length property. I am confused on us ...

  8. 【转】The magic behind array length property

    Developer deals with arrays every day. Being a collection, an important property to query is the num ...

  9. .NET上传大文件时提示Maximum request length exceeded错误的解决方法

    使用IIS托管应用程序时,当我们需要上传大文件(4MB以上)时,应用程序会提示Maximum request length exceeded的错误信息.该错误信息的翻译:超过最大请求长度. 解决方法: ...

随机推荐

  1. [转]Oracle_ProC编程

    1.引言 由于PL/SQL不能用来开发面向普通用户的应用程序,必须借助其他语言或开发工具. 在Linux操作系统下应该用什么语言或开发工具来进行Oracle数据库应用的开发呢?本文将介绍2种方案:Pr ...

  2. 社保系列11《ATR》

    1)  冷复位(Cold Reset) 当IC卡的电源电压和其他信号从静止状态中复苏且申请复位信号时,IC卡产生的复位. 2)  热复位(Warm Reset) 在时钟(CLK)和电源电压(VCC)处 ...

  3. 禁止生成文件Thumbs.db

    Thumbs.db是一个用于Microsoft Windows XP.Windows7 或 mac os x缓存Windows Explorer的缩略图的文件.Thumbs.db保存在每一个包含图片或 ...

  4. Linux软链接与硬链接

    1.Linux链接概念Linux链接分两种,一种被称为硬链接(Hard Link),另一种被称为符号链接(Symbolic Link).默认情况下,ln命令产生硬链接. [硬连接]硬连接指通过索引节点 ...

  5. DB2批处理数据导入

    这里需要两个BAT文件 first.bat @echo off @set /p databaseName=1)请输入数据库名: @set /p userName=2)请输入用户名: @set /p u ...

  6. AsyncTask和Handler两种异步方式的实现和区别比较

    1  AsyncTask实现的原理,和适用的优缺点 AsyncTask,是android提供的轻量级的异步类,可以直接继承AsyncTask,在类中实现异步操作,并提供接口反馈当前异步执行的程度(可以 ...

  7. hdu 2578 Dating with girls(1)

    题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=2578 Dating with girls(1) Description Everyone in the ...

  8. MYSQL主键存在则更新,不存在则插入的解决方案(ON DUPLICATE KEY UPDATE)

    经常我们使用的最简单的数据库操作就是数据的更新,删除和插入,对于批量删除和插入的方法相信大家都很清楚,那么批量更新估计有的人就不知道了,并且还有批量插入,在插入时若有主键冲突则更新的操作,这在EAV模 ...

  9. TFS(Taobao File System)安装方法

    文章目录: 一.TFS(Taobao File System)安装方法 二.TFS(Taobao File System)配置dataServer.分区.挂载数据盘 三.TFS(Taobao File ...

  10. Swift Tips - 当 Swift 遇上 CocoaPods

    CocoaPods 作为 iOS 开发的包管理工具,几乎成为了 Objective-C 的行业标准.它为我们提供了非常方便的包管理功能.而苹果正式发布 Swift 语言也已经有半年多时间了,Swift ...