C#编写windows服务,多服务为什么只启动一个(ServiceBase.Run)

时间:2017-01-07 19:15:43   收藏:0   阅读:3038

https://zhidao.baidu.com/question/380395667.html

 

技术分享

 

//多服务一个宿主程序时必须注间以下要点: 

 Service1的ServiceName 必须 Installer1.Designer.cs 中的 serviceInstaller1.ServiceName 完全一致

//this.ServiceName MUST match this.serviceInstaller1.ServiceName in Installer1.Designer.cs file 

//this.ServiceName MUST match this.serviceInstaller2.ServiceName in Installer1.Designer.cs file

//this.ServiceName MUST match this.serviceInstaller3.ServiceName in Installer1.Designer.cs file

 

//serviceInstaller1中的代码

//this.serviceInstaller1.ServiceName = "Win32MultiServices1"; 

//Service1中的代码

//this.ServiceName = "Win32MultiServices1"

原文:http://www.cnblogs.com/xdot/p/6259876.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!