WCF服务已超过最大阵列长度配额(16384)
我有一个wsf服务和一个客户端应用程序。在尝试与客户端和服务通信时,我收到了以下消息: “格式化程序在尝试反序列化消息时引发异常:在尝试反序列化参数时出错。InnerException消息为“反序列化FileBlob类型的对象时出错。最大数组长度配额(16384)”读取XML数据时已超过。可以通过更改创建XML读取器时使用的XmlDictionaryReaderQuotas对象的MaxArrayLength属性来增加此配额。第1行,位置25931。“。有关详细信息,请参阅InnerException。” 我有customBinding元素,它不允许我插入“readerQuotas”部分。在客户端和服务配置中,我都有以下绑定元素:WCF服务已超过最大阵列长度配额(16384),wcf,wcf-binding,serialization,readerquotas,Wcf,Wcf Binding,Serialization,Readerquotas,我有一个wsf服务和一个客户端应用程序。在尝试与客户端和服务通信时,我收到了以下消息: “格式化程序在尝试反序列化消息时引发异常:在尝试反序列化参数时出错。InnerException消息为“反序列化FileBlob类型的对象时出错。最大数组长度配额(16384)”读取XML数据时已超过。可以通过更改创建XML读取器时使用的XmlDictionaryReaderQuotas对象的MaxArrayLength属性来增加此配额。第1行,位置25931。“。有关详细信息,请参阅InnerExcepti
<customBinding>
<binding name="LicenseServiceBinding"
closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00">
<security authenticationMode="UserNameOverTransport">
<localClientSettings maxClockSkew="00:07:00" />
<localServiceSettings maxClockSkew="00:07:00" />
</security>
<windowsStreamSecurity />
<httpsTransport maxReceivedMessageSize="2147483646"/>
</binding>
</customBinding>
提前感谢您的帮助:)您应该能够在
元素中添加
元素:
<customBinding>
<binding name="LicenseServiceBinding"
closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00">
<security authenticationMode="UserNameOverTransport">
<localClientSettings maxClockSkew="00:07:00" />
<localServiceSettings maxClockSkew="00:07:00" />
</security>
<readerQuotas maxArrayLength="32768" />
<windowsStreamSecurity />
<httpsTransport maxReceivedMessageSize="2147483646"/>
</binding>
</customBinding>
您提到它“不允许我插入”。您收到了什么错误消息?事实上,我通过在textMessageEncoding部分中添加readerQuotas解决了这个问题。 谢谢你的帮助
<textMessageEncoding messageVersion="Soap11">
<readerQuotas maxDepth="32" maxStringContentLength="5242880" maxArrayLength="2147483646" maxBytesPerRead="4096" maxNameTableCharCount="5242880"/>
</textMessageEncoding>
对于自定义绑定,readerQuotas似乎必须嵌套在您设置的任何MessageEncoding(textMessageEncoding、binaryMessageEncoding…)中。编码是它的子元素,也适用于其他消息编码,如