zoukankan      html  css  js  c++  java
  • 一个项目多个服务的注意事项

    用Vs2010一个项目多个服务,服务启动提示错误:

     

    错误1083:配置成在该可执行程序中运行的这个服务不能执行该服务。

    1、  在main函数处修改,

                ServicesToRun = new ServiceBase[]

                                {

                                         new Service1() ,

                      new Service2()

                                };

     

    2、  注意每个服务名,在每个服务的Designer.cs下;

     

     

            /// <summary>

            ///设计器支持所需的方法 - 不要

            ///使用代码编辑器修改此方法的内容。

            /// </summary>

            private void InitializeComponent()

            {

                components = new System.ComponentModel.Container();

                this.ServiceName = "Service1";

            }

    这里是服务名,注意ProjectInstaller的ServicName要和这里一致;

     

     

            /// <summary>

            ///设计器支持所需的方法 - 不要

            ///使用代码编辑器修改此方法的内容。

            /// </summary>

            private void InitializeComponent()

            {

                components = new System.ComponentModel.Container();

                this.ServiceName = "Service2";

            }

     

     

    3、  ProjectInstaller的ServicName要和服务的名称一致 ,ProjectInstaller.Designer.cs

     

                //

                //Installer1

                //

                this.Installer1.ServiceName = "Service1";

                //

                // Installer2

                //

                this.Installer2.ServiceName = "Service2";

     

  • 相关阅读:
    xpath取其中几个使用position
    pycharm2018.3.5 下载激活(windows平台)
    switch host 切换本地host
    leveldb 学习记录(四)Log文件
    bittorrent 学习(一) 种子文件分析与bitmap位图
    分布式协议学习笔记(三) Raft 选举自编写代码练习
    谷歌开源的一个BTREE实现 Go语言
    分布式协议学习笔记(二) 日志复制
    分布式协议学习笔记(一) Raft 选举
    利用redis制作消息队列
  • 原文地址:https://www.cnblogs.com/superfeeling/p/3283977.html
Copyright © 2011-2022 走看看