【发布时间】:2025-12-21 14:10:11
【问题描述】:
我有一个 wsf 服务和一个客户端应用程序。在尝试与客户端和服务进行通信时,我收到以下消息:
"格式化程序在尝试反序列化消息时抛出异常:尝试反序列化参数 http://tempuri.org/:blob 时出错。InnerException 消息是“反序列化 FileBlob 类型的对象时出错。最大读取 XML 数据时已超出数组长度配额 (16384)。可以通过更改创建 XML 读取器时使用的 XmlDictionaryReaderQuotas 对象的 MaxArrayLength 属性来增加此配额。第 1 行,位置 25931。'。有关更多详细信息,请参阅 InnerException。 "
我有 customBinding 元素,它不允许我插入“readerQuotas”部分。在客户端和服务配置中,我都有以下绑定元素:
<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>
提前感谢您的帮助:)
【问题讨论】:
标签: wcf wcf-binding serialization readerquotas