.NET Windows Service - multiple services in one project

前端 未结 3 1991
迷失自我
迷失自我 2020-12-28 15:23

Currently, I have a project with a Windows Service. I also created another \"Setup Project\" which installs the Windows Service.

My question is this: Can I add anot

相关标签:
3条回答
  • 2020-12-28 16:13

    I am a developer for an open source windows service hosting framework called Daemoniq. Running multiple services in one process is one of its features. You can download it from http://daemoniq.org

    Current features include:

    • container agnostic service location via the CommonServiceLocator
    • set common service properties like serviceName, displayName, description and serviceStartMode via app.config
    • run multiple windows services on the same process
    • set recovery options via app.config
    • set services depended on via app.config
    • set service process credentials via command-line
    • install, uninstall, debug services via command-line

    Thanks!

    0 讨论(0)
  • 2020-12-28 16:14

    I know this is already answered, but if you'd like an example (code) of how to run two services in the same project please have a look at my answer to a similar question:

    Can I have multiple services hosted in a single windows executable.

    Thanks!

    0 讨论(0)
  • 2020-12-28 16:22

    yes, you can have multiple services in the same project. Although they both use the same exe, they are loaded into different memory spaces and act independently of each other.

    0 讨论(0)
提交回复
热议问题