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. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
System.IO.PipeException: The pipe endpoint 'net.pipe://vm101.lab.foo.co.uk/VDNService' could not be found on your local machine.System.ServiceModel.EndpointNotFoundException:net.pipe://vm101.lab.foo.co.uk/VDNService上没有可以接受该消息的端点。这通常是由不正确的地址或SOAP操作引起的。有关更多详细信息,请参阅InnerException(如果存在)。 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.
任何帮助,将不胜感激。
1 个解决方案
#1
"net.pipe" addresses a local transport. You need to use a different binding to talk across machines. You probably want to use netTcp.
“net.pipe”解决了本地传输问题。您需要使用不同的绑定来跨机器进行通信。您可能想要使用netTcp。
#1
"net.pipe" addresses a local transport. You need to use a different binding to talk across machines. You probably want to use netTcp.
“net.pipe”解决了本地传输问题。您需要使用不同的绑定来跨机器进行通信。您可能想要使用netTcp。