简体   繁体   English

远程使用net.pipe绑定的WCF问题

[英]WCF problems with remote use of net.pipe binding

I'm having an issue with a WCF application that I've written. 我编写的WCF应用程序有问题。

When both the client and the server are on the same machine it runs fine, however when I try and run it with the client and server on two separate machine (as it is supposed to run) I get the following in exception: 当客户端和服务器都在同一台机器上时,它运行良好,但是,当我尝试在两台单独的计算机上与客户端和服务器一起运行它(因为它应该运行)时,出现以下异常:

System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at net.pipe://vm101.lab.foo.co.uk/VDNService that could accept the message. System.ServiceModel.EndpointNotFoundException:在net.pipe://vm101.lab.foo.co.uk/VDNService上没有侦听终结点的端点可以接受该消息。 This is often caused by an incorrect address or SOAP action. 这通常是由不正确的地址或SOAP操作引起的。 See InnerException, if present, for more details. 有关更多详细信息,请参见InnerException(如果存在)。
System.IO.PipeException: The pipe endpoint 'net.pipe://vm101.lab.foo.co.uk/VDNService' could not be found on your local machine. System.IO.PipeException:在本地计算机上找不到管道终结点“ net.pipe://vm101.lab.foo.co.uk/VDNService”。

What I don't understand is the 2nd line of the exception, that it could not find the end point on my local machine. 我不明白的是异常的第二行,它找不到本地计算机上的终点。 The end point is on another machine, not my local machine isn't it? 终点在另一台计算机上,不是我的本地计算机上吗?

I'm using a net named pipe binding ( NetNamedPipeBinding ) rather than an HTTP one. 我使用的是网络命名管道绑定( NetNamedPipeBinding ),而不是HTTP。

And the WCF code is hand coded rather than generated (as I understand is the norm, I didn't learn this till after I'd written the application though). 而且WCF代码是手动编码的,而不是生成的(据我所知,这是规范,但是直到编写应用程序后,我才学到这一点)。

Any help would be appreciated. 任何帮助,将不胜感激。

"net.pipe" addresses a local transport. “ net.pipe”处理本地传输。 You need to use a different binding to talk across machines. 您需要使用不同的绑定来跨机器对话。 You probably want to use netTcp. 您可能要使用netTcp。

http://msdn.microsoft.com/en-us/library/ms730879.aspx http://msdn.microsoft.com/en-us/library/ms730879.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM