0

I am starting WCF services from a Windows service. But at the same time I need to start another Windows service from the same windows service in separate instance.

Below is the code which I am using for starting a single WCF service.

Program.cs

static void Main()
{
        ServiceBase[] ServicesToRun;

        ServicesToRun = new ServiceBase[] 
        { 
            new WCFService() 
        };

        ServiceBase.Run(ServicesToRun);
}

I need help to start another service from this service in separate instance, please help me.

Thanks in advance.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Hanumantha
  • 107
  • 2
  • 12
  • Check if this can help http://stackoverflow.com/questions/8725082/how-to-install-multiple-instance-of-same-windows-service – NMK Oct 06 '14 at 14:13
  • @Mohank, I want to call another service in the same Main method. I do not want to create same service as another instance. Actually if I run this windows service it should start one WCF service and another windows service(In this folder watch functionality is written) – Hanumantha Oct 07 '14 at 05:11

1 Answers1

0

I found answer in below link Multiple Windows Services in One exe

We need to add one more Windows Service file in the same file and need to add installer for that. It will start two services in the same Single Windows service.

Community
  • 1
  • 1
Hanumantha
  • 107
  • 2
  • 12