【发布时间】:2013-11-14 20:53:02
【问题描述】:
我的 WCF 服务配置有问题,我收到错误消息: “格式化程序在尝试反序列化消息时抛出异常...... 已超过最大字符串内容长度配额 (8192) ....."
所以在谷歌搜索后我发现我需要在我的配置文件中设置这一行:
<readerQuotas maxStringContentLength="2147483647" />
但是当我将它添加到 web.config 时,我得到了错误:
无法识别的元素“readerQuotas”
我该怎么办?!
我的绑定:
<bindings>
<basicHttpBinding>
<binding name="Stream_Binding" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" transferMode="Streamed" messageEncoding="Mtom"/>
<readerQuotas maxStringContentLength="2147483647" />
</basicHttpBinding>
</bindings>
【问题讨论】:
标签: c# wcf readerquotas