WCF客户端:现有连接被远程主机强行关闭

问题描述:




我想在远程主机中使用WCF服务.我创建了一个空项目,并尝试通过提供URL?wsdl来添加服务引用.但是我被以下错误困住了

下载"http://example/example.svc?wsdl"时出错.
操作已超时
元数据包含无法解析的引用:"http://example/example.svc?wsdl".
收到对http://example/example.svc?wsdl的HTTP响应时发生错误.这可能是由于服务端点绑定未使用HTTP协议.这也可能是由于服务器终止了HTTP请求上下文(可能是由于服务关闭了).有关更多详细信息,请参阅服务器日志.
基础连接已关闭:接收时发生意外错误.
无法从传输连接中读取数据:远程主机强行关闭了现有连接.
远程主机强行关闭了现有连接


请提供解决此错误的建议.


谢谢
Mary

Hi,


I want to consume a WCF service in a remote host. I created an empty project and tried to Add Service reference by giving the URL?wsdl. But I m stuck with the following error

There was an error downloading "http://example/example.svc?wsdl".
The operation has timed out
Metadata contains a reference that cannot be resolved: "http://example/example.svc?wsdl".
An error occurred while receiving the HTTP response to http://example/example.svc?wsdl. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.
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


Please provide suggestions to overcome this error.


Thanks
Mary


该错误有很多可能,请尝试以下文章:
http://forums.asp.net/t/1440964.aspx/1 [ ^ ]

http://*.com/问题/6042539/一个现有的连接被强制关闭,由远程主机与wcf一起 [ http://*.com/questions/7209823/一个现有的连接被远程主机wcf强制关闭 [ http://*.com/Questions/2087680/an-existing-connection-s-for-force-closed-by-the-remote-host-in-wcf [
Hi,
There are many possibilities for that error, try these posts out:
http://forums.asp.net/t/1440964.aspx/1[^]

http://*.com/questions/6042539/an-existing-connection-was-forcibly-closed-by-the-remote-host-with-wcf[^]

http://*.com/questions/7209823/an-existing-connection-was-forcibly-closed-by-the-remote-host-wcf[^]

http://*.com/questions/2087680/an-existing-connection-was-forcibly-closed-by-the-remote-host-in-wcf[^]

I hope it helps