Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to communicate between processes? [duplicate]

Tags:

c#

.net

process

I can come up only with serialization, using of WCF, etc. But is there the standard common way for communication between 2 processes in .Net?

UPDATE: What I actually mean how to communicate between 2 processes locally when I do not need to use WCF, Remoting and network at all. Are there some ways of doing it? And I am interesting in more elegant ways than storing data to HDD or to database.

like image 353
Oleg Dudnyk Avatar asked Mar 05 '26 17:03

Oleg Dudnyk


2 Answers

With no other information, I would suggest using WCF with a named pipes configuration:

What is the best choice for .NET inter-process communication?

like image 132
Justin Beckwith Avatar answered Mar 07 '26 05:03

Justin Beckwith


You can also look at .NET Remoting. But for all intents and purposes you shouldn't be using it unless you have explicit requirements that are satisfied by remoting like...in-process, cross-appdomain communication.

I would just look at WCF's NetNamedPipeBinding. It sounds like it's exactly what you want: http://www.codeproject.com/KB/WCF/wcfipcsample.aspx

Also it seems this question has already been answered:

Interprocess communication for Windows in C# (.NET 2.0)

C# - WCF - inter-process communication

like image 25
Anuj Avatar answered Mar 07 '26 07:03

Anuj