WCF调用,读取 XML 数据时,超出最大字符串内容长度配额 (8192)。

yang_5 2013-09-17 03:20:53
一个WEB调用我的WCF,内容过长就报如下错误:
格式化程序尝试对消息反序列化时引发异常: 尝试对参数 http://tempuri.org/ 进行反序列化时出错: formDataXml。InnerException 消息是“反序列化对象 属于类型 System.String 时出现错误。读取 XML 数据时,超出最大字符串内容长度配额 (8192)。通过更改在创建 XML 读取器时所使用的 XmlDictionaryReaderQuotas 对象的 MaxStringContentLength 属性,可增加此配额。 第 137 行,位置为 76。”。有关详细信息,请参阅 InnerException。

不要让我去网上搜索,已经搜索了一天了,加配置全部不行


<bindings>
<wsHttpBinding>
<binding name="HttpBinding" maxReceivedMessageSize="2097152">
<readerQuotas maxDepth="32" maxStringContentLength="2097152" maxArrayLength="2097152" maxBytesPerRead="2097152" maxNameTableCharCount="2097152" />
<security mode="None"></security>
</binding>
</wsHttpBinding>
<netTcpBinding>
<binding name="NoSecurtyBinding">
<security mode="None" />
</binding>
</netTcpBinding>
</bindings>



<service name="Achievo.MMIP.WMP.WebService.WMPProcService" behaviorConfiguration="wmpWcfBehavior">
<endpoint address="" binding="wsHttpBinding" contract="Achievo.MMIP.WMP.WebServiceIService.WMPServiceProcIService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
...全文
306 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
yang_5 2013-09-17
  • 打赏
  • 举报
回复
问题解决,详细请点击http://blog.csdn.net/yang_5/article/details/11775819
yang_5 2013-09-17
  • 打赏
  • 举报
回复
引用 2 楼 zhaogongzuoa 的回复:
找到问题了吗?加QQ私聊,我帮你解决,我是郭迎
你运气好,没人回答,100分送给你
zhaogongzuoa 2013-09-17
  • 打赏
  • 举报
回复
找到问题了吗?加QQ私聊,我帮你解决,我是郭迎
yang_5 2013-09-17
  • 打赏
  • 举报
回复
晕 一发完贴就自己找到原因了

12,162

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 Web Services
社区管理员
  • Web Services社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧