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 '坚持','细心','计划'
  • 相关阅读:
    [APIO2017]商旅(分数规划,spfa)
    Codeforces Round #542 div1
    Codeforces Round #556 (Div. 2)
    Codeforces Round #543
    Codeforces Round #534 (Div. 1)
    公式的复习?
    关于概率dp的HINT
    [JSOI2009]密码 [AC自动机]
    bzoj1444[Jsoi2009]有趣的游戏[AC自动机]
    「LibreOJ β Round #4」框架 [bitset]
  • 原文地址:https://www.cnblogs.com/weeky/p/2151784.html
Copyright © 2011-2022 走看看