Martin Ba
Martin Ba

Reputation: 38981

What is the difference between .NET remoting and WCF/TCP for local/LAN communication?

OK, so I know that WCF is supposed to replace dotNET remoting, yet I seem to fail to really grasp if WCF is a full replacement with more options, or if .NET remoting offers some features that are missing from WCF?

As the title hints at, I do not need any of that Web* stuff. The use case is having a C# desktop application expose an RPC-ish interface to make it possible for other programs to communicate with / control the application. Number of possible clients is probably < 10 and communication is exclusively local network.

I found this question that asks for something similar, but this other question seems to imply that .NET-remoting can in fact be used in ways that WCF does not offer.

Upvotes: 1

Views: 2427

Answers (3)

Max Strini
Max Strini

Reputation: 2348

There's no concept of "marshal by reference" in WCF, by design. Whether marshal-by-reference is ever a good idea is another matter, but regardless it's a major .NET Remoting feature that doesn't exist in WCF.

Upvotes: 4

DarrellNorton
DarrellNorton

Reputation: 4701

Use WCF with the self-hosted option (within the desktop application). Expose net.tcp binary endpoints assuming all other clients are .NET.

Check the sample "Form Host" on the iDesign downloads page: http://www.idesign.net/idesign/DesktopDefault.aspx?tabindex=5&tabid=11

Upvotes: 2

Andrey
Andrey

Reputation: 60115

WCF is full replacement for .net remoting. Your scenario is perfectly valid for WCF. You will easily complete it after reading few tutorials. All the mentioned use cases are controversial, I see no reason in using remoting nowadays.

Upvotes: 1

Related Questions