G
Guest
I have defined multiple ServiceBase-derived services within a single
assembly. If I follow the MSDN examples and create a single project
installer, a single ServiceProcessInstaller, and multiple ServiceInstallers,
everything works as expected. However, all services are hosted in a single
process - which is not what I want to happen; I want each to run in its own
process.
I have tried creating individual project and process installers for each
service with the same problematic results. All services appear to install.
Each service started runs in its own process. However, independent of which
service is started, only the first service defined in the array
'ServicesToRun' passed to
System.ServiceProcess.ServiceBase.Run(ServicesToRun) will start. It will
start multiple times - once for each service defined, but it is the same
service in each case. If I change the order of the service elements in the
'ServicesToRun' array, I can change which service actually starts. The
ServiceName on the installers all match their respective services, so I
don't understand what is wrong.
Is it possible to host multiple services each in its own process and yet
have them all defined in a single assembly? I have toyed around with
command-line arguments to the service, but the installers don't appear to be
able to easily define command-line arguments for the host executable.
Any suggestions would be greatly appreciated.
Thanks,
Dolph
assembly. If I follow the MSDN examples and create a single project
installer, a single ServiceProcessInstaller, and multiple ServiceInstallers,
everything works as expected. However, all services are hosted in a single
process - which is not what I want to happen; I want each to run in its own
process.
I have tried creating individual project and process installers for each
service with the same problematic results. All services appear to install.
Each service started runs in its own process. However, independent of which
service is started, only the first service defined in the array
'ServicesToRun' passed to
System.ServiceProcess.ServiceBase.Run(ServicesToRun) will start. It will
start multiple times - once for each service defined, but it is the same
service in each case. If I change the order of the service elements in the
'ServicesToRun' array, I can change which service actually starts. The
ServiceName on the installers all match their respective services, so I
don't understand what is wrong.
Is it possible to host multiple services each in its own process and yet
have them all defined in a single assembly? I have toyed around with
command-line arguments to the service, but the installers don't appear to be
able to easily define command-line arguments for the host executable.
Any suggestions would be greatly appreciated.
Thanks,
Dolph