加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

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

发布时间:2020-12-17 00:14:35 所属栏目:安全 来源:网络整理
导读:主要原因webservice返回值的长度超过readerQuotas中的了maxStringContentLength值,造成返回值截断,不完整,反序列化时出错。 ?readerQuotas maxDepth="32" maxStringContentLength="81920" maxArrayLength="16384" ? ? ? ? ? ? ? ? ? ? ? ? maxBytesPerRea
主要原因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: 超过了最大请求长度。? ? ?在 System.Web.HttpRequest.GetEntireRawContent()? ? ?在 System.Web.HttpRequest.get_InputStream()? ? ?在 System.Web.Services.Protocols.SoapServerProtocol.Initialize()? ? ?--- 内部异常堆栈跟踪的结尾 ---? ?可以在Web.config修改最大的请求长度,如修改成50M system.web>? ? ?<httpRuntime ? maxRequestLength= "51200" ? executionTimeout="3600" ? />? ?</system.web>?

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读