我如何在Windows Appln与Web Appln之间进行通信 [英] How I Communicate Between Windows Appln With Web Appln

查看:120
本文介绍了我如何在Windows Appln与Web Appln之间进行通信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了一个Windows应用程序来监控警报和中央电视台视频,现在我想创建一个网络客户端,我可以看到来自不同位置的警报和视频..什么对我来说是什么wcf tcp或什么。我想当我设置我的应用程序然后我的电脑成为Web应用程序的服务器..我想不需要手动配置国际空间站..请建议这可能

解决方案

1 - 消息队列:您可以让两个应用程序使用相同的数据库,并使用消息队列在它们之间进行通信。您需要轮询队列以获取新消息。



2 - Windows消息队列:还有一个Windows消息队列。您可以在网络上为您的计算机设置1个公共队列,也可以拥有许多专用队列。您甚至可以设置一个事件处理程序,当新消息在队列中时触发该事件处理程序。更多相关信息:

DotNetMQ :用于.NET的完整消息队列系统 [ ^ ]



3 - 网络服务:我在我的Windows服务和我的服务之间使用网络服务进行通讯网络应用。这是因为它易于设置,易于维护,服务也不会在一天内发送 许多消息



4 - pipe (即tcp)通常用于需要安全线路来传输数据。它不是太难以设置和维护(尽管可能存在陡峭的学习曲线)。如果任何其他方法都足够,它可能会过度。

C#Async命名管道 [ ^ ]



(不如v1)

希望有帮助^ _ ^

Andy

i have create a windows appln to moniter alarms and cctv videos, now i want to create a web client by using that i can see alarms and video from different location.. what would be batter for me wcf tcp or what. and i want when i setup my application then my pc become server for web appln ..i want no manual configuration of ISS.. please suggests is this possible

解决方案

1 - Message Queue: You can have both apps use the same db and use a message queue to communicate between them. You will need to poll the queue for new message.

2 - Windows message queue: There is a windows message queue as well. You can set up 1 public queue for your machine on the network, or you can have many private queues. You can even set up an event handler that fires when a new message is in the queue. more on this here:
DotNetMQ: A Complete Message Queue System for .NET[^]

3 - Web Service: I use web services for comms between my windows service and my web app. This is because it's easy to set up, easy to maintain and the service will not send too many messages in a day

4 - pipe (i.e. tcp) usually used if you want a secure line to stream data along. It isn't too hard to set up and maintain (although there can be a steep learning curve). It can be overkill if any of the other methods suffice.
C# Async Named Pipes[^]

(not as good as v1)
Hope that help ^_^
Andy


这篇关于我如何在Windows Appln与Web Appln之间进行通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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