.NET Windows服务

编程入门 行业动态 更新时间:2024-10-10 07:21:56
本文介绍了.NET Windows服务 - 在一个项目中的多个服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

目前,我有一个Windows服务项目。我还创造了另一个安装项目,它安装在Windows服务。

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

我的问题是这样的:我可以添加其他Windows服务,以同一个项目? (这样一来,我可以使用1安装程序,并共享服务之间的一些code更容易)。如果可以,是否意味着当一个服务遇到错误,那么这两个服务被停止,或者他们单独错误每个出其他?

My question is this: Can I add another Windows Service to the same project? (This way, I can use 1 installer, and share some code between the services more easily.) If I can, does that mean when one service encounters errors then both services are stopped, or do they error out independently of each other?

是否有编码1服务每个项目,或有多项服务于一体的项目之间的任何其他区别?

Are there any other differences between coding 1 service per project, or having multiple services in one project?

推荐答案

是的,你可以在同一个项目的多个服务。尽管他们都使用相同的exe文件,它们被加载到不同的存储空间,并独立地行动彼此的。

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.

更多推荐

.NET Windows服务

本文发布于:2023-11-08 20:51:54,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1570426.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:NET   Windows

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!