C#:调用webservice时提示对操作的回复消息正文进行反序列化时出错

主要原因webservice返回值的长度超过readerQuotas中的了maxStringContentLength值,造成返回值截断,不完整,反序列化时出错。

<readerQuotas maxDepth="32" maxStringContentLength="81920" maxArrayLength="16384"

maxBytesPerRead="4096" maxNameTableCharCount="16384" />

解决方案:调整maxStringContentLength的值

Web service 超过了最大请求长度

Web service的默认的请求长度是4M

当内容超过了4M会报错

System.Web.Services.Protocols.SoapException: 运行配置文件中指定的扩展时出现异常。 ---> System.Web.HttpException: 超过了最大请求长度。

原文地址:https://www.cnblogs.com/Fooo/p/5681838.html