读取XML数据时已超出最大字符串内容长度配额(8192)。通过更改...上的MaxStringContentLength属性可以增加此配额 [英] 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...

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

问题描述

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





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.


bindings>
			<webHttpBinding>
				<binding name="wsHttpBinding" closeTimeout="00:01:00"
						 openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
						 allowCookies="false" bypassProxyOnLocal="false"
						 hostNameComparisonMode="StrongWildcard"
						 maxBufferSize="2147483647" maxBufferPoolSize="2147483647"
						 maxReceivedMessageSize="2147483647"
						 transferMode="Buffered"
						 useDefaultWebProxy="true">
					<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
                          maxArrayLength="2147483647"
                          maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
				</binding>
			</webHttpBinding>
		</bindings>







MaxStringContentLength的最大尺寸是多少?

推荐答案

这是使用WCF服务时的常见问题。我保持这篇文章的方便性来自

StackOverflow的。有一点需要注意,服务器端和客户端都需要修改设置。
This is a common problem when working with WCF services. I keep this article handy from the
StackOverflow. One thing to note that there are settings both server side and client side that need to be modified.


在服务器端和客户端提供相同的绑定

否则你会收到错误..
Give same binding on server and on client side
otherwise you will get error..


这篇关于读取XML数据时已超出最大字符串内容长度配额(8192)。通过更改...上的MaxStringContentLength属性可以增加此配额的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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