gpt4 book ai didi

WCF 服务已超出最大数组长度配额 (16384)

转载 作者:行者123 更新时间:2023-12-03 10:09:23 26 4
gpt4 key购买 nike

我有一个 wsf 服务和一个客户端应用程序。在尝试与客户端和服务进行通信时,我收到以下消息:

“格式化程序在尝试反序列化消息时抛出异常:尝试反序列化参数时出错 http://tempuri.org/:blob 。InnerException 消息是‘反序列化 FileBlob 类型的对象时出错。最大数组长度配额 (16384)读取 XML 数据时已超出此配额。可通过更改创建 XML 读取器时使用的 XmlDictionaryReaderQuotas 对象的 MaxArrayLength 属性来增加此配额。第 1 行,位置 25931。'。有关更多详细信息,请参阅 InnerException。

我有 customBinding 元素,它不允许我插入“readerQuotas”部分。在客户端和服务配置中,我都有以下绑定(bind)元素:

<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>

在此先感谢您的帮助:)

最佳答案

实际上,我已经通过在 textMessageEncoding 部分添加 readerQuotas 解决了这个问题。
谢谢您的帮助。

<textMessageEncoding messageVersion="Soap11">
<readerQuotas maxDepth="32" maxStringContentLength="5242880" maxArrayLength="2147483646" maxBytesPerRead="4096" maxNameTableCharCount="5242880"/>
</textMessageEncoding>

关于WCF 服务已超出最大数组长度配额 (16384),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3068076/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com