Dmi*_*sky 27 wcf serialization wcf-binding readerquotas
我有一个wsf服务和一个客户端应用程序.在尝试与客户端和服务进行通信时,我收到了以下消息:
" 格式化程序在尝试反序列化消息时抛出异常:尝试反序列化参数http://tempuri.org/:blob时出错.InstallException消息是'反序列化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>
Run Code Online (Sandbox Code Playgroud)
在此先感谢任何帮助:)
Dmi*_*sky 43
实际上,我已经通过在textMessageEncoding部分中添加readerQuotas解决了这个问题.谢谢您的帮助.
<textMessageEncoding messageVersion="Soap11">
<readerQuotas maxDepth="32" maxStringContentLength="5242880" maxArrayLength="2147483646" maxBytesPerRead="4096" maxNameTableCharCount="5242880"/>
</textMessageEncoding>
Run Code Online (Sandbox Code Playgroud)
Ric*_*lay 18
您应该能够<readerQuotas>在<binding>元素中添加元素:
<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>
Run Code Online (Sandbox Code Playgroud)
你提到它"不允许我插入".你得到什么错误信息?
| 归档时间: |
|
| 查看次数: |
38097 次 |
| 最近记录: |