error 1083 the executable program that this service is configured to run does not implemented the service

流过昼夜 提交于 2019-11-29 13:22:01

answer: if you are getting this error check the service name and service process installer service name. Both must be the same.

happy coding

Source: http://cut.lu/cddc2c

Raj Bhide

Also ensure that in the entry point for the exe (usually the Main procedure) an instance of the your service class (that derives from Service base is created).eg.

private static void Main()
        {
            var servicesToRun = new ServiceBase[]
                                              {
                                                  new MyService1(),
                                                  new MyService2()
                                              };
            ServiceBase.Run(servicesToRun);
        }

If you do not do this, say you do not include code to create instance of MySerivce2, as above, you will get the error message above when you try to start MyService2.

I've got same problem. My solution for this was to check the service name and service installer service name. Both must be the same.

private void InitializeComponent()
{
    components = new System.ComponentModel.Container();
    this.ServiceName = "EmailService";
}

To add another possibility, see answer #7 on this link.

The jist of the solution is to assign the service name as you expect it to be at initialization time. In my situation, the Service.ServiceName field was not set

Consider using log statements to write the service name just prior to ServiceBase.Run(servicesToRun).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!