【问题标题】:The formatter threw an exception while trying to deserialize the message格式化程序在尝试反序列化消息时抛出异常
【发布时间】:2013-04-20 11:20:54
【问题描述】:

格式化程序在尝试反序列化消息时抛出异常:反序列化操作“PostTransaction”的请求消息正文时出错。读取 XML 数据时已超出最大字符串内容长度配额 (8192)。可以通过更改创建 XML 阅读器时使用的 XmlDictionaryReaderQuotas 对象的 MaxStringContentLength 属性来增加此配额。第 52 行

【问题讨论】:

    标签: wcf


    【解决方案1】:

    您需要将此参数添加到您的配置中,例如

    <bindings> <webHttpBinding> <binding> <readerQuotas maxStringContentLength="65535"/> </binding> </webHttpBinding> </bindings>

    这个答案的例子:Fixing maximum length quota on XmlDictionaryReaderQuotas for WCF 4.0 REST

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-10-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多