格式化程序在尝试反序列化消息时引发了异常.超出最大阵列长度配额(16384) [英] The formatter threw an exception while trying to deserialize the message. The maximum array length quota (16384) has been exceeded

查看:524
本文介绍了格式化程序在尝试反序列化消息时引发了异常.超出最大阵列长度配额(16384)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows应用程序窗体中使用wcf服务

我在web.config和app.config中使用此代码,但仍然出现错误




openTimeout ="00:01:00" receiveTimeout ="00:10:00" sendTimeout ="00:01:00"
allowCookies ="false" passwordProxyOnLocal ="false" hostNameComparisonMode ="StrongWildcard"
maxBufferSize ="2147483647" maxBufferPoolSize ="2147483647" maxReceivedMessageSize ="2147483647"
messageEncoding =文本" textEncoding ="utf-8" transferMode =缓冲"
useDefaultWebProxy ="true">

maxBytesPerRead ="2147483647" maxNameTableCharCount ="2147483647"/>


realm ="/>






这是错误


格式化程序尝试反序列化消息时引发异常:尝试反序列化参数http://tempuri.org/:mail时发生错误. InnerException消息是反序列化类型OutlookService.UserMail的对象时发生错误.读取XML数据时,已超出最大数组长度配额(16384).通过更改在创建XML阅读器时使用的XmlDictionaryReaderQuotas对象上的MaxArrayLength属性,可以增加此配额.第1行,位置43258.''.

请帮助我

i''m using wcf service in windows application form

I''m using this code in web.config and app.config but still i''m getting error




openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">

maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />


realm="" />






Here is the error


The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:mail. The InnerException message was ''There was an error deserializing the object of type OutlookService.UserMail. 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 43258.''.

Please help me

推荐答案

您的答案出在错误消息中.它告诉您增加最大数组长度.请参阅以下标记为答案的答案:

http://stackoverflow.com/questions/464707/maximum-array-length-quota [ ^ ]
Your answer lies in the error message. It''s telling you to increase the maximum array length. See the following marked answer:

http://stackoverflow.com/questions/464707/maximum-array-length-quota[^]


这篇关于格式化程序在尝试反序列化消息时引发了异常.超出最大阵列长度配额(16384)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆