zoukankan      html  css  js  c++  java
  • C#创建后台服务注意事项

    前端时间自己学习整了个小小的后台服务,比较需要注意的是在install.cs中要添加一个serviceInstaller和serviceProcessInstaller

     private void InitializeComponent()
            {
                //components = new System.ComponentModel.Container();
                this.serviceInstaller1 = new System.ServiceProcess.ServiceInstaller();
                this.serviceProcessInstaller1 = new System.ServiceProcess.ServiceProcessInstaller();
                // 
                // serviceInstaller1
                // 
                this.serviceInstaller1.Description = "Stest测试服务";
                this.serviceInstaller1.DisplayName = "Stest测试服务";
                this.serviceInstaller1.ServiceName = "Stest测试服务";
                this.serviceInstaller1.StartType = System.ServiceProcess.ServiceStartMode.Automatic;
                // 
                // serviceProcessInstaller1
                // 
                this.serviceProcessInstaller1.Account = System.ServiceProcess.ServiceAccount.LocalService;
                this.serviceProcessInstaller1.Password = null;
                this.serviceProcessInstaller1.Username = null;
                // 
                // ProjectInstaller
                // 
                this.Installers.AddRange(new System.Configuration.Install.Installer[] {
                this.serviceInstaller1,
                this.serviceProcessInstaller1});
    
            }
    
            #endregion
    
            private System.ServiceProcess.ServiceInstaller serviceInstaller1;
            private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1;
    
    EXEC dbo.success '坚持','细心','计划'
  • 相关阅读:
    集群技术
    Docker Swarm(一)
    服务器集群
    生产环境swarm集群规划和管理
    集群的分类
    Arcengine C#开发源码
    BIOS设置中开启cpu睿频功能
    aida64怎么用?aida64最详细的使用教程
    SQL Server2019最大并行度
    IIS 之 在IIS7、IIS7.5中应用程序池最优配置方案
  • 原文地址:https://www.cnblogs.com/weeky/p/2151784.html
Copyright © 2011-2022 走看看