在Web应用程序中添加WCF服务 [英] Add WCF Service in Web Application

查看:81
本文介绍了在Web应用程序中添加WCF服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用Service Reference添加WCF服务时,出现以下错误

元数据包含无法解析的引用:"http://192.168.0.12:90/Service.svc?wsdl".
WSDL文档包含无法解析的链接.
下载``http://192.168.0.12:90/Service.svc?xsd=xsd0''时出错.
基础连接已关闭:接收时发生意外错误.
无法从传输连接中读取数据:远程主机强行关闭了现有连接.
远程主机强行关闭了现有连接
元数据包含无法解析的引用:"http://192.168.0.12:90/Service.svc".
内容类型application/soap + xml;服务http://192.168.0.12:90/Service.svc不支持charset = utf-8.客户端和服务绑定可能不匹配.
远程服务器返回错误:(415)无法处理消息,因为内容类型为'application/soap + xml; charset = utf-8"不是预期的类型"text/xml; charset = utf-8''..
如果服务是在当前解决方案中定义的,请尝试构建解决方案并再次添加服务引用.

请帮助我..

When I am adding WCF service using Service Reference i got the following error

Metadata contains a reference that cannot be resolved: ''http://192.168.0.12:90/Service.svc?wsdl''.
The WSDL document contains links that could not be resolved.
There was an error downloading ''http://192.168.0.12:90/Service.svc?xsd=xsd0''.
The underlying connection was closed: An unexpected error occurred on a receive.
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
An existing connection was forcibly closed by the remote host
Metadata contains a reference that cannot be resolved: ''http://192.168.0.12:90/Service.svc''.
Content Type application/soap+xml; charset=utf-8 was not supported by service http://192.168.0.12:90/Service.svc. The client and service bindings may be mismatched.
The remote server returned an error: (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''..
If the service is defined in the current solution, try building the solution and adding the service reference again.

please help me..

推荐答案

请参阅此Stackoverflow线程以解决同一问题. > http://stackoverflow.com/questions/4660480/wcf-元数据-包含无法解决的引用 [
See this Stackoverflow thread for the same issue. http://stackoverflow.com/questions/4660480/wcf-metadata-contains-a-reference-that-cannot-be-resolved[^]


这篇关于在Web应用程序中添加WCF服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆