ASP MVC和WinForm的应用程序之间的通信 [英] Communication between ASP MVC and WinForm Applications

查看:364
本文介绍了ASP MVC和WinForm的应用程序之间的通信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要寻找一种方式,用户可以在ASP和WinForm的应用程序之间的通信。

I am looking for a way user can communicate between an ASP and Winform applications.

我要寻找像soluto.com,我想让用户通过网站发送命令到其他计算机。所以我们可以说,用户注册了10台电脑,这是登记在MVC应用程序。用户可以选择所有10个计算机并发送一个做这个任务的一个按钮,点击。

I am looking for something like soluto.com, I want to let the user send commands to other computers via Website. So let's say the user signed up for 10 computers, which is registered on the mvc app. User can select all the 10 computer and send a "Do this task" with a click of a button.

我想是这样,WinForm的将创建一个httplisten服务器。每次WinForm的是开放的,它会发送一个我是在网上后到MVC,随着IP一起:端口。服务器将发送到该IP的请求:要求当口

I am thinking something like, Winform will create a httplisten server. Everytime winform is open, it will send a "I am online" post to mvc, along with IP:Port. The server will send a request to that ip:port when required.

这种做法似乎很不安全不过,有一个开放的端口,配置防火墙等,似乎是一个矫枉过正。

That approach seems very unsecure though, having an open port, configuring firewall and etc, seems like a overkill.

我不知道是否有办法实现这一点的任何其他方式。

I was wondering if there way any other way of accomplishing this.

感谢您的帮助。

P.S。之前声称这是一个愚蠢的想法,梨形做这样的事情也。看看Agomo.com

P.S. Before you claim this is a stupid idea, Piriform is doing something like this also. Take a look at Agomo.com

推荐答案

使用 SingalR 与正确设计的Web和Windows应用程序(例如MVP,MVC的,等等。)

Use SingalR with properly architected web and windows applications (e.g. MVP, MVC, etc.)

SignalR与窗口的客户(WPF)

控制台应用程序和放大器; SignalR

这篇关于ASP MVC和WinForm的应用程序之间的通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆