0

I have 2 services defined in my solution: GetService, PutService.

I have added an installer for each service, and when I run the install - they both show up in the Service Manager.

I am able to control GetService without any issue. However, when I attempt to start PutService I am getting the 1083 error.

In the main section of the program, I've ensured that both Services are declared:

static void Main()
{
    ServiceBase[] ServicesToRun;
    ServicesToRun = new ServiceBase[]{
        new GetService(),
        new PutService()
    };
    ServiceBase.Run(ServicesToRun);
}

When the line new PutService() is executed, I can trace through the constructor for the PutService class.

But when the line ServiceBase.Run(ServicesToRun); executes, the system throws the 1083 error and the debugger just stops. I never hit the PutService.Onstart() method.

The exact syntax of the error is:

Error 1083: The executable program that this service is configured to run in does not implement the service.

I'm a relative newbie - so any/all help is very much greatly appreciated.

jhpratt
  • 6,841
  • 16
  • 40
  • 50
  • OK - I had a look at these references - thank you. In order to make it work - I had to add the following two lines of code: `ServicesToRun[0].ServiceName = "GetService"; ServicesToRun[1].ServiceName = "PutService";` Before executing the `ServiceBase.Run(ServicesToRun);` I'm not 100% sure why that solved the problem - can anyone elaborate in layman's terms? – Chris Taliercio May 04 '18 at 03:50
  • Chris, I had the same problem. After debugging the program start, I solved it by right clicking on the service designer, choosing properties and renaming the "service1" in the ServiceName property to the actual service name. – Orhan ODABAŞI Feb 24 '19 at 12:47

0 Answers0