前不久出现的WCF一个错误 —— MaxStringContentLength & MaxReceivedMessageSize
2009-01-16 00:13
585 查看
具体错误信息如下:
The maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader."
WCF配置节:
如果没有设置<readerQuotas maxStringContentLength="6553600" />,则默认值为readerQuotas的默认最大长度为8192. 因此当长度超过8192时,会抛出文章开头提到的错误。
同样需要另外设定binding的maxReceivedMessageSize,否则会抛出System.ServiceModel.CommunicationException异常。
The maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader."
WCF配置节:
<bindings> <netTcpBinding> <binding name="NewBinding0" maxReceivedMessageSize="6553600"> <readerQuotas maxStringContentLength="6553600" /> </binding> </netTcpBinding> </bindings>
如果没有设置<readerQuotas maxStringContentLength="6553600" />,则默认值为readerQuotas的默认最大长度为8192. 因此当长度超过8192时,会抛出文章开头提到的错误。
同样需要另外设定binding的maxReceivedMessageSize,否则会抛出System.ServiceModel.CommunicationException异常。
相关文章推荐
- WCF - MaxStringContentLength & MaxReceivedMessageSize
- WCF - MaxStringContentLength & MaxReceivedMessageSize
- WCF 配置文件中的MaxStringContentLength & MaxReceivedMessageSize
- WCF 配置文件中的MaxStringContentLength & MaxReceivedMessageSize
- 使用WCF服务的客户端出现maxReceivedMessageSize异常解决方案
- 使用WCF服务的客户端出现maxReceivedMessageSize异常
- WCF:读取 XML 数据时,超出最大字符串内容长度配额 (8192)。通过更改在创建 XML 读取器时所使用的 XmlDictionaryReaderQuotas 对象的 MaxStringContentLength 属性,可增加此配额。
- sharepoint 2010 WCF : The MaxStringContentLength string content length quota (8192)
- WCF: 已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性。
- WCF 已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性
- WCF 已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性。
- WCF已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性
- WCF请求数据:已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性。
- 已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性
- 大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize
- 已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性。
- C# WCF WinCE 解决方案 错误提示之:已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性
- 引用webservice 已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性。
- WCF常见异常-The maximum string content length quota (8192) has been exceeded while reading XML data
- 已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性