【问题标题】:Unrecognized element 'readerQuotas' on BasicHttpBindingBasicHttpBinding 上无法识别的元素“readerQuotas”
【发布时间】: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


    【解决方案1】:

    readerQuotas 节点需要在绑定内

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-12-21
      • 2020-01-25
      • 2011-12-14
      相关资源
      最近更新 更多