为了账号安全,请及时绑定邮箱和手机立即绑定

C# 调用WebService 报错 响应消息的内容类型 text/html; charset=utf-8 与绑定(text/xml; charset=...

C# 调用WebService 报错 响应消息的内容类型 text/html; charset=utf-8 与绑定(text/xml; charset=...

C#
www说 2018-12-07 09:40:39
每次调用接口操作大量数据时就会报这个错误,下面是报错全部信息: 响应消息的内容类型 text/html; charset=utf-8 与绑定(text/xml; charset=utf-8)的内容类型不匹配。如果使用自定义编码器,请确保正确实现 IsContentTypeSupported 方法。响应的前 1024 个字节为:“<html><head><title>请求已超时。</title><style>body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }pre {font-family:"Lucida Console";font-size: .9em}.marker {font-weight: bold; color: black;text-decoration: none;}.version {color: gray;}.error {margin-bottom: 10px;}.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }</style></head><body bgcolor="white"><span><H1>“/PDAWS”应用程序中的服务器错误。<hr width=100% size=1 color=silver></H1><h2> <i>请求已超时。”。
查看完整描述

1 回答

?
翻过高山走不出你

TA贡献1875条经验 获得超3个赞

你要在服务端和客户端的配置文件里设置最大接收和发送字节数,不然数据大了就会报错

查看完整回答
反对 回复 2018-12-24

添加回答

代码语言

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号