简体   繁体   English

如何在C#中执行服务器应用程序方法

[英]how to execute server application method in C#

I have a client application and server application.我有一个客户端应用程序和服务器应用程序。 I wont to execute server application method using client application.我不会使用客户端应用程序执行服务器应用程序方法。 such as RMI in java.比如java中的RMI。 How can i do that in c# ?我怎么能在 c# 中做到这一点?

You can call Remote methods and events in C#.您可以在 C# 中调用远程方法和事件。 Here you can find better tutorial to do that. 在这里你可以找到更好的教程来做到这一点。

But better to use WCF to expose service layer to do that.但是最好使用 WCF 来公开服务层来做到这一点。

From MSDN来自MSDN

.NET Remoting based applications to the Windows Communication Foundation to take advantage of the new infrastructure for the creation of service oriented applications.将基于 .NET Remoting 的应用程序添加到 Windows Communication Foundation,以利用新的基础结构来创建面向服务的应用程序。

If you are looking for an easy to use WCF-like framework that can be used with .NET Framework, .NET Core and .NET 5.0 you are welcome to check out Zerto.WebApi.Rpc .如果您正在寻找可与 .NET Framework、.NET Core 和 .NET 5.0 一起使用的易于使用的类似 WCF 的框架,欢迎您查看Zerto.WebApi.Rpc You define the services using C# interfaces, and behind the scenes it will use HTTP and JSON (using ASP.NET Core).您使用 C# 接口定义服务,并在后台使用 HTTP 和 JSON(使用 ASP.NET Core)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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