35

What is the best WCF binding to use for inter-process communication?

I have used WCF over local networks and it is amazing, and I'd like to use it for inter-process communication as well. I do not want to expose the communication over the network, however.

jonathanpeppers
  • 26,115
  • 21
  • 99
  • 182

1 Answers1

87

Use the NetNamedPipeBinding for inter-process communication on the same machine. Use the NetTcpBinding if you are crossing machine boundaries. I've found this flow chart helpful.

WCF Binding Selection Flow Chart.

Community
  • 1
  • 1
Matt Davis
  • 45,297
  • 16
  • 93
  • 124
  • For inter-process communication on same machine, what type of project should I create? `WCF Service Library` project or `WCF Service Application` project? – Faizan Mubasher Oct 25 '17 at 04:47
  • 1
    http://www.c-sharpcorner.com/UploadFile/db2972/wcf-difference-between-service-application-and-service-lib/ – Matt Davis Oct 25 '17 at 05:37
  • Thanks! Should go for WCF Service Library. – Faizan Mubasher Oct 25 '17 at 06:21
  • For same machine inter process communication use as Matt already said NetNamedPipeBinding. I have a very basic example on my blog to show how this can be achieved. [https://dopeydev.com/wcf-interprocess-communication/](https://web.archive.org/web/20150814232144/http://dopeydev.com/wcf-interprocess-communication/) – Riain McAtamney Aug 09 '16 at 14:10