简体   繁体   中英

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.

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.

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM