I have a single service installer project that installs multiple services. This is great but a single unhandled exception in any single service will stop all services that were installed by this installer.
The code for the installer looks something like this
ServiceBase[] ServicesToRun;
ServicesToRun = new ServiceBase[]
{
new Service1() ,
new Service2() ,
...
};
ServiceBase.Run(ServicesToRun);
So once the service is installed I can see several separate services in the windows service management window and each can be started, stopped, paused, resumed independently.
However if one suffers an unhandled exception then they all stop.
Ideally only the service that had the problem would stop and the other services would continue on their merry way.
Can anyone suggest a way to do this without creating a truly separate installer project for each service?