如何在Windows服务之间进行通信 [英] How to communicate between Windows Services
问题描述
我有我使用C#创建2个窗口服务。
I have 2 windows services that I created using C#.
我想其中一个服务调用一个函数在第二个窗口服务。
I would like one of the services to call a function in the second windows service.
我应该怎么办呢
编辑:
问题是,我必须到运行的应用程序(我不需要他们是相当的服务进程也不错),但我的需要这2个应用程序进行通信,这2个应用程序在同一台服务器上,
The issue is That I have to application that running ( I don't need them to be Rather service Process is good too) but I need this 2 application to communicate, this 2 application are on the same server,
推荐答案
我发现所有的其他的答案正确的,但有点太复杂(WCF是一个大问题),而不是可扩展性(记忆和命名管道只能在同一SEVER工作)。我建议你 DotNetMQ 消息系统。它易于使用和部署,并让你即使在不同的服务器上运行的进程之间的通信。
I found all the other answers correct but a little too much complicated (WCF is a big deal) and not scalable (memory and named pipes will only work on the same sever). I suggest you DotNetMQ messaging system. It's easy to use and deploy and let's you communicate even between processes running on different servers.
这篇关于如何在Windows服务之间进行通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!