What is the best choice for .NET inter-process communication?
WCF is the best choice. It supports a number of different transport mechanisms (including Named Pipes) and can be completely configuration driven. I would highly recommend that you take a look at WCF.
Here is a blog that does a WCF vs Remoting performance comparison.
A quote from the blog:
The WCF and .NET Remoting are really comparable in performance. The differences are so small (measuring client latency) that it does not matter which one is a bit faster. WCF though has much better server throughput than .NET Remoting. If I would start completely new project I would chose the WCF. Anyway the WCF does much more than Remoting and for all those features I love it.
MSDN Section for WCF
What's the best technology for passing a stop argument to a service from a .NET-Application by Inter-process Communication?
According to @MatSnow 's comment under the original question the Service Controller might be the best choice for this problem.
ServiceController Class Stop Method
Best way for interprocess communication in two ways between a server and a client
If you don't know anything about communication, pick an off the shelf solution. A Bidirectional WCF channel is a good example. See What You Need To Know About One-Way Calls, Callbacks, And Events for a primer. Read WCF Overview (including all the links!) for an introduction into WCF.
If you are more versed into communications then you should had defined the problem more clearly:
- what authentication model is used? Kerberos, certificates, password, none?
- intranet or internet?
- who's doing the listenning? your own service, http.sys, WCF activation?
- and the most fundamental question: syncronous or asynchronous? And I do not mean asyn as an async API, but async as in queued message oriented protocol.
IPC Mechanisms in C# - Usage and Best Practices
Most recent Microsoft's stuff in IPC is Windows Communication Foundation. Actually there is nothing new in the lower level (tcp, upd, named pipes etc) But WCF simplifies IPC development greatly.
Useful resource:
- Interprocess Communication with WCF on Dr. Dobb's portal
- WCF Communication Options in the .NET Framework 3.5
and of course MSDN on WCF
Related Topics
C# Convert Int to String With Padding Zeros
Entity Framework 5 Updating a Record
Remove Element of a Regular Array
Simple Proof That Guid Is Not Unique
How to Do Joins in Linq on Multiple Fields in Single Join
Mvc Form Not Able to Post List of Objects
Using C#, How Does One Figure Out What Process Locked a File
Reading Settings from App.Config or Web.Config in .Net
How to Send Email in ASP.NET C#
Cross-Platform File Name Handling in .Net Core
What's the Difference Between the 'Ref' and 'Out' Keywords
Double to String Conversion Without Scientific Notation
Metadataexception: Unable to Load the Specified Metadata Resource
Insert 2 Million Rows into SQL Server Quickly
Most Efficient Way to Randomly "Sort" (Shuffle) a List of Integers in C#