C#调用Server Soap接口MaxArrayLength和MaxStringContentLength错误解决
2010-05-20 16:27
531 查看
如下:
The maximum array length quota (16384) has been exceeded while reading XML data. This quota may be increased by changing the MaxArrayLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader.
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.
在调用Soap接口的Client端修改app.config:
<binding name="Service1Soap1" closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="655360000" maxBufferPoolSize="524288" maxReceivedMessageSize="655360000"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="81920000" maxArrayLength="163840000"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
增加最大数组长度以及字符串长度等等,就可以解决上面的问题。
http://msdn.microsoft.com/zh-cn/library/ms731361(VS.90).aspx
http://msdn.microsoft.com/zh-cn/library/ms731325(v=VS.90).aspx
The maximum array length quota (16384) has been exceeded while reading XML data. This quota may be increased by changing the MaxArrayLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader.
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.
在调用Soap接口的Client端修改app.config:
<binding name="Service1Soap1" closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="655360000" maxBufferPoolSize="524288" maxReceivedMessageSize="655360000"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="81920000" maxArrayLength="163840000"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
增加最大数组长度以及字符串长度等等,就可以解决上面的问题。
http://msdn.microsoft.com/zh-cn/library/ms731361(VS.90).aspx
http://msdn.microsoft.com/zh-cn/library/ms731325(v=VS.90).aspx
相关文章推荐
- C# 调用Office Excel 接口方法Quit(),但是Excel进程不退出的解决办法
- EXTASPNET C# ASP.NET sql server 调用存储过程超时,解决方法
- EXTASPNET C# ASP.NET sql server 调用存储过程超时,解决方法
- C# 调用C++ DLL 返回类型为字符的接口 出现异常 解决办法
- 【手记】小心在where中使用NEWID()的大坑 【手记】解决启动SQL Server Management Studio 17时报Cannot find one of more components...的问题 【C#】组件分享:FormDragger窗体拖拽器 【手记】注意BinaryWriter写string的小坑——会在string前加上长度前缀length-prefixed
- C#调用C++接口提示找不到指定的模块解决方法,本机正常
- C#调用exe文件,IIS发布后无法掉用本地exe程序的解决方法
- [转载]使用Java客户端类调用c# WebService和xml rpc server
- C#调用VC DLL接口函数参数类型转换方法介绍
- C# 解决 调用线程非安全的控件xx不是在本线程上创建 异常
- C#通过发送 http 请求调用接口之Post
- c#调用Delphi的dll函数遇到的问题及解决方法
- MySQL server has gone away 问题的解决方法(查询的结果集超过 max_allowed_packet )
- C#多处调用接口、仅一个回调方法的处理思路
- c# 动态调用.net编写的webservices接口
- 用nginx解决webstorm内置server调用本地api的跨域问题
- c# 【MVC】WebApi通过HttpClient来调用Web Api接口
- C#第一次调用matlab程序反应慢的“解决”办法
- C#调用百度地图API入门&解决BMap未定义问题
- C# 调用SQL的存储过程的接口及实现