I am wondering how I can send information from a C# MVC Web Application to a C# Desktop Application.
我想知道如何将信息从C#MVC Web应用程序发送到C#桌面应用程序。
For example, I want to be able to send some string
s from my web application that is hosted on some server to a client's personal computer where they will have my desktop application executable somewhere on their local machine. Also, I am trying to avoid the client having to open the desktop application (that will be running in the background) to click anything. I am wanting the desktop application to constantly be checking for data coming in from the web application. I would probably have a while()
loop checking for that information in the desktop application and then once it has received data from the web application I will do stuff with it on the desktop side.
例如,我希望能够从托管在某个服务器上的Web应用程序向客户端的个人计算机发送一些字符串,在这些计算机上,我们的桌面应用程序可以在本地计算机上的某个位置执行。此外,我试图避免客户端必须打开桌面应用程序(将在后台运行)点击任何东西。我希望桌面应用程序不断检查来自Web应用程序的数据。我可能会在桌面应用程序中有一个while()循环检查该信息,然后一旦从Web应用程序接收到数据,我将在桌面端执行它。
Can anyone point me to some good examples of this or provide a simple example of this being done with some string
s?
任何人都可以向我指出一些这方面的好例子,或者提供一个简单的例子,用一些字符串完成这个吗?