1

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.

Community
  • 1
  • 1
Martin Ba
  • 37,187
  • 33
  • 183
  • 337
  • 2
    It's not "supposed to replace" remoting, it replaced it four years ago. – John Saunders Dec 08 '10 at 19:04
  • possible duplicate of [.NET Remoting vs. Web Services vs. Windows Communication Foundation (WCF)](http://stackoverflow.com/questions/507862/net-remoting-vs-web-services-vs-windows-communication-foundation-wcf) – John Saunders Dec 08 '10 at 19:07
  • WCF is pretty easy to develop with and seems to be robust enough to tackle any communication you need. I wouldn't bother with remoting IMO.. – Jeff LaFay Dec 08 '10 at 19:41

3 Answers3

4

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.

Max Strini
  • 2,288
  • 21
  • 24
  • Does this mean every bit of communication involves copying objects over (like Marshall-by-value), or does it mean you just don't need to worry about specifying ": MarshallByRefObject" or does it mean something else altogether? – NH. Jun 09 '17 at 21:08
  • Yes, all communication in WCF involves copying/serialization. – Max Strini Jun 10 '17 at 22:22
  • 1
    OK, then, upvoted this and downvoted the false answer about it being a full replacement. By the way, one scenario that Microsoft never fully solved, but is partially solved (REST calls only) by MarshallByRefObject and AppDomains, is http://stackoverflow.com/questions/26160118/net-https-requests-with-different-security-protocols-across-threads – NH. Jun 12 '17 at 15:07
2

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

DarrellNorton
  • 3,901
  • 2
  • 21
  • 21
1

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.

Andrey
  • 59,039
  • 12
  • 119
  • 163