0

We are building a window service that starts/stops other processes, and the communication between the UI and the service is with NetNamedPipe.

Every process have a host that can get shutdown call (still with NetNamedPipe in order to avoid port cross).

I have used it on my computer and when I moved it to the server it didn't work (NetNamedPipe is not for cross network - now I know).

Is there any way to do this right?

dsolimano
  • 8,870
  • 3
  • 48
  • 63
guyl
  • 2,158
  • 4
  • 32
  • 58

2 Answers2

5

If this is going to run on the local network, I would suggest using a TCP endpoint on your WCF service to connect to instead of the Named Pipe endpoint.

Øyvind Bråthen
  • 59,338
  • 27
  • 124
  • 151
  • NetTcp ? why not http ? whet about port crossing (using the same ports) ? – guyl Mar 09 '11 at 08:25
  • No reason to use a http binding, if you are not going to access it over the internet. If you are worried about using the same ports, read this article regarding TCP port sharing for WCF: http://msdn.microsoft.com/en-us/library/ms734772.aspx – Øyvind Bråthen Mar 09 '11 at 08:28
  • our servers is over the net using vpn ... should we use http ? – guyl Mar 09 '11 at 08:32
  • If you use VPN, TCP should work just fine. If you want to lose the VPN as well, you can of course convert to a http binding, but TCP over VPN will be the more secure approach and just as easy to do as long as the VPN is already set up. – Øyvind Bråthen Mar 09 '11 at 08:38
  • Thank you for the incite, it was very helpful. good to have people like you on stackoverflow – guyl Mar 09 '11 at 08:40
  • Good to know it was helpful. God luck with your project. – Øyvind Bråthen Mar 09 '11 at 08:41
1

For .Net - to - .Net communication, it's best to use NetTcp. You would use Http when mixing technologies (.Net to COM / Java, for instance), or when a firewall would otherwise block your communication.

So Http is what you use only if there are reasons not to use NetTcp.

Roy Dictus
  • 32,551
  • 8
  • 60
  • 76