读取XML数据时已超出最大字符串内容长度配额(8192) [英] The maximum string content length quota (8192) has been exceeded while reading XML data

查看:159
本文介绍了读取XML数据时已超出最大字符串内容长度配额(8192)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





当我将实体对象传递给WebService时出现以下错误



读取XML数据时已超出最大字符串内容长度配额(8192)。通过更改创建XML阅读器时使用的XmlDictionaryReaderQuotas对象的MaxStringContentLength属性可以增加此配额







我尝试通过在Webservice的webconfig中提供以下代码来解决此问题,但错误仍然存​​在。任何人都可以帮助!!!!!





< bindings>

< basichttpbinding>

< binding>

name =myBinding

maxReceivedMessageSize =2147483647>

< readerquotas>

maxDepth =2147483647

maxStringContentLength =2147483647

maxArrayLength =2147483647

maxBytesPerRead = 2147483647

maxNameTableCharCount =2147483647/>




Hi,

I got the following error when i passed an entity object to a WebService

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



I tried to solve this problem by giving the below code in webconfig of Webservice,but the error still remains. Can anyone Help!!!!!


<bindings>
<basichttpbinding>
<binding>
name="myBinding"
maxReceivedMessageSize="2147483647">
<readerquotas>
maxDepth="2147483647"
maxStringContentLength="2147483647"
maxArrayLength="2147483647"
maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647" />


推荐答案

你是这样设置的......

did u set like this...
<bindings>
  <nettcpbinding>
    <binding name="ExStreamWCFBinding" closetimeout="00:00:05" opentimeout="00:00:05" receivetimeout="00:00:05" sendtimeout="00:00:05" transfermode="Buffered" transactionprotocol="OleTransactions" hostnamecomparison="StrongWildCard" maxbufferpoolsize="524288" maxbuffersize="524288" maxconnections="10" maxreceivedmessagesize="5242880">
      <readerquotas maxdepth="32" maxstringcontentlength="5242880" maxarraylength="16384" maxbytesperread="4096" maxnametablecharcount="16384" />
    </binding>
  </nettcpbinding>
</bindings>




<endpoint address="" binding="netTcpBinding" bindingconfiguration="ExStreamWCFBinding">
</endpoint>





有关详细信息,请参阅这些链接。

http://bipinkarms.com/wp/?p=140 [ ^ ]



http://stackoverflow.com/questions/6600057/the-maximum -string-content-length-quota-8192-has-been-while-reading-x# [ ^ ]


这篇关于读取XML数据时已超出最大字符串内容长度配额(8192)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆