c# - .Net Remoting 与 WCF

标签 c# wcf .net-remoting

我想知道我可以从 .net 远程处理和 WCF 做同样的事情,那么为什么 WCF 比 .Net 远程处理更受欢迎。我可以在哪里(或在什么情况下)选择 .Net 远程处理或 WCF?

最佳答案

.NET Remoting 应用程序可以使用 HTTP、TCP 和 SMTP 协议(protocol),而 WCF 可以使用命名管道和 MSMQ 以及所有这些协议(protocol)。

您可能会在这里找到最佳答案:From .NET Remoting to the Windows Communication Foundation

Conclusion

As you have seen, a migration from .NET Remoting to WCF is not a task you have to be afraid of. For most applications, a simple three-step process can bring your application to the new platform. In most cases, you will only have to mark your interface contracts with [ServiceContract] and [OperationContract], your data structures with [DataContract] and [DataMember] and maybe change some parts of your activation model to be based on sessions instead of client-activated objects.

If you decide that you want to take advantage of the features of the Windows Communication Foundation, the complete migration from .NET Remoting to WCF should therefore be a rather easy task for the majority of applications.

您还可以在 A Performance Comparison of Windows Communication Foundation (WCF) with Existing Distributed Communication Technologies 中找到两者之间的性能差异

When migrating distributed applications written with ASP.NET Web Services, WSE, .NET Enterprise Services and .NET Remoting to WCF, the performance is at least comparable to the other existing Microsoft distributed communication technologies. In most cases, the performance is significantly better for WCF over the other existing technologies. Another important characteristic of WCF is that the throughput performance is inherently scalable from a uni processor to quad processor.

To summarize the results, WCF is 25%—50% faster than ASP.NET Web Services, and approximately 25% faster than .NET Remoting. Comparison with .NET Enterprise Service is load dependant, as in one case WCF is nearly 100% faster but in another scenario it is nearly 25% slower. For WSE 2.0/3.0 implementations, migrating them to WCF will obviously provide the most significant performance gains of almost 4x.

关于c# - .Net Remoting 与 WCF,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19252777/

相关文章:

c# - 将 .Net Remoting 从 Framework 2 迁移到 4 的问题

c# - .Net 远程处理错误 "Requested Service not found"

c# - 不要在 Blazor Server 应用程序中包含特定配置的所有 @page

c# - 检查IP地址和端口是否响应

c# - 服务仅有时会抛出 No 'Access-Control-Allow-Origin' header 错误

c# - 配置 WCF 客户端终结点以使用相对地址(对于 Azure)

c# - 在没有物理文件的情况下创建流

c# - 我是否需要运行服务器来实现类似数据库的功能?

c# - 如何使用 Delphi 2007 中的非 IIS 托管、WCF、C# Web 服务?