8

I'm working on a project requiring inter-AppDomain-intra-process and inter-process-intra-machine communication. Yes... I know... NET Remoting is widely considered a legacy technology but I'm facing with two very special problems and maybe in these scenario WCF is not a full replacement of NET Remoting.

1) inter-AppDomain-intra-process communication

The application I'm working on start and need to search and load one on more addins. I wish to load each addin in a separate AppDomain. I need a way to create the each Addin instance in his AppDomain and call some interface methods of this instance at some point. Here NET Remoting is the only way, right? Moreover if we wish to apply the System.Addins paradigm, apparently based only NET Remoting and not marked as obsolete...

2) inter-process-intra-machine communication

Here I can for sure expose from my application a WCF service and call this service from my client using Named Pipes.

What I really want to do is to expose an object model from my application, so that my application can be automated from some NET client, much like the OLE/COM Automation object model exposed by Excel. Any COM Client can get an object reference to Excel.Application and query open documents, open some new documents and so on.

I think WCF is good to communicate in a platform independent way. But in this case I need only to communicate from Net client to Net application on the same machine. WCF service phylosophy don't allow, I think, to expose a rich object model with objects, collection, field, static member, method overloading... Or I'm wrong?

Please excuse my bad english and my perhaps newbie question.

4

1 回答 1

2

您可以在此处阅读类似问题的答案:.NET Remoting 真的已弃用吗?

我可以补充一点,我最近使用 .NET Remoting 进行了相对简单的双向进程间通信,并且几乎无缝进行,所以我可以说它在多年来没有得到 Microsoft 的积极支持之后仍然非常有用。

至于 COM,如果您对 COM 客户端可以访问您的产品有强烈要求,我建议通过 COM 互操作显式实现 COM 接口。此外,还有一篇关于同时使用 COM 和 .NET Remoting 的有趣文章,您可能会感兴趣:http: //msdn.microsoft.com/en-us/magazine/cc164085.aspx

于 2013-09-04T07:17:44.530 回答