Windows Service : More than one user Service may run within the same process
-
Hi, I am working on a windows service that monitor a path and does some upload based on the FileWatcher class. As per microsoft, it say that "More than one user Service may run within the same process". Therefore, i created two services (component classes) in my windows service project and added an instance of each to the service to run as shown below: static void Main() { ServiceUtility initUtl = new ServiceUtility(Constants System.ServiceProcess.ServiceBase[] ServicesToRun; ServicesToRun = new System.ServiceProcess.ServiceBase[] { new exchangeRateFileWatcher(), new KYCFileWatcher() }; System.ServiceProcess.ServiceBase.Run(ServicesToRun); } However, i read that the second service will run only if the first one fails. Can you please tell me whether it is possible (and how) to run the two services within the same process (i.e exe)? Thank you for your kind help :-)
Carpe diem, Krg
-
Hi, I am working on a windows service that monitor a path and does some upload based on the FileWatcher class. As per microsoft, it say that "More than one user Service may run within the same process". Therefore, i created two services (component classes) in my windows service project and added an instance of each to the service to run as shown below: static void Main() { ServiceUtility initUtl = new ServiceUtility(Constants System.ServiceProcess.ServiceBase[] ServicesToRun; ServicesToRun = new System.ServiceProcess.ServiceBase[] { new exchangeRateFileWatcher(), new KYCFileWatcher() }; System.ServiceProcess.ServiceBase.Run(ServicesToRun); } However, i read that the second service will run only if the first one fails. Can you please tell me whether it is possible (and how) to run the two services within the same process (i.e exe)? Thank you for your kind help :-)
Carpe diem, Krg
Don't cross post. It's considered rude and isn't going to help you get an answer any faster. While this is the original message, a response has already been posted to the one here[^].
Scott Dorman
Microsoft® MVP - Visual C# | MCPD President - Tampa Bay IASA [Blog][Articles][Forum Guidelines]
Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
-
Don't cross post. It's considered rude and isn't going to help you get an answer any faster. While this is the original message, a response has already been posted to the one here[^].
Scott Dorman
Microsoft® MVP - Visual C# | MCPD President - Tampa Bay IASA [Blog][Articles][Forum Guidelines]
Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
Ok scott.Sorry for that.
Carpe diem, Krg
-
Ok scott.Sorry for that.
Carpe diem, Krg
datastruct wrote:
Sorry for that.
No worries, just letting you know.
Scott Dorman
Microsoft® MVP - Visual C# | MCPD President - Tampa Bay IASA [Blog][Articles][Forum Guidelines]
Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai