【问题标题】:C# Windows Service latest technologyC# Windows 服务最新技术
【发布时间】:2023-05-25 14:53:01
【问题描述】:

全部,

一段时间以来,我一直在使用源自 ServiceBase 的 C# 编写 Windows 服务。 到目前为止,我的服务托管在服务器中,它们通常在服务器上侦听消息队列并处理消息。

是否有在 WCF 中创建此类服务的新方法?

谢谢,

MK

【问题讨论】:

  • 出于好奇,什么样的消息队列? MSMQ,其他的,还是自定义的?

标签: c# wcf windows-services


【解决方案1】:

是的。查看Windows Process Activation Services

据我了解,这与您过去在 IIS 下托管远程处理对象的方式非常相似,但使用 WAS,您无需像以前那样涉及整个巨大的 IIS 堆栈。

【讨论】:

  • 我也听说过很多有关 Windows Server App Fabric 的信息。请参阅下面的答案。
【解决方案2】:

Microsoft Message Queuing 似乎是您想要的,尽管有一些像 BizTalk Server 这样的分支可能使用类似的东西。只是为了提出一两个想法。

【讨论】:

    【解决方案3】:

    我已经开始使用名为 TopShelf 的开源项目来轻松创建应用程序,这些应用程序可以作为 Windows 服务或控制台应用程序运行以进行调试。

    【讨论】:

      【解决方案4】:

      我也听说过很多关于 Windows Server App Fabric 的信息。这是来自App Fabric white paper 的简短介绍。

      AppFabric Hosting Services (originally code-named “Dublin”) doesn’t create some entirely new hosting infrastructure. Instead, it builds on what’s already provided by Internet Information Services (IIS) and Windows Process Activation Service (WAS). On this foundation, AppFabric Hosting Services adds extra capabilities for running and managing WCF services, including workflow services. Figure 7 illustrates this idea.

      Windows App Fabric Home

      【讨论】: