WCF 客户端和服务绑定可能不匹配

来源:互联网 发布:生驹里奈 知乎 编辑:程序博客网 时间:2024/04/27 14:55
元数据包含无法解析的引用:“http://localhost/WCFService/Service.svc?wsdl”。
WSDL 文档包含无法解析的链接。
下载“http://localhost/WCFService/Service.svc?xsd=xsd0”时出错。
基础连接已经关闭: 接收时发生错误。
无法从传输连接中读取数据: 远程主机强迫关闭了一个现有的连接。。
远程主机强迫关闭了一个现有的连接。
元数据包含无法解析的引用:“http://localhost/WCFService/Service.svc”。
服务 http://localhost/WCFService/Service.svc 不支持内容类型 application/soap+xml; charset=utf-8。客户端和服务绑定可能不匹配。
远程服务器返回错误: (415) Cannot process the message because the content type 'application/soap+xml; charset=utf-8' was not the expected type 'text/xml; charset=utf-8'.。

如果该服务已在当前解决方案中定义,请尝试生成该解决方案,然后再次添加服务引用。

备注:客户端删除服务引用,重新添加wcf服务引用