G
Guest
Hi,
I am trying to create a Windows Service in C# that will install on a single box to support multiple environments. I have created the service and it works perfect. Now however, the client has decided to run multiple environments of the application (a web app) on the one box (i.e. production, acceptance & training). The problem is that the service also needs to run in each environment with it's own configuration settings.
I found an article from this newsgroup from Patrick Lam (MAY 2002) that sounded like it was what I needed but couldn't really get it to work. Is there any examples of how I could modify my existing service code so that the name of the service etc is something I can have entered during the installation process and that information is configured dynamically etc so that multiple copies of the service installation exe's are put into seperate directories and therefore can be totally independant of one another. That way the acceptance environment can be updated with the newer version without affecting production and vice versa.
This way I would run the setup package enter a name (e.g. "Production") and get something like:
Processor Service - Production
installed on the box.
I could then run the setup package again, not get told the product is already installed, and enter another name (e.g. "Acceptance") and end up with:
Processor Service - Acceptance
Processor Service - Production
listed in the Services manager.
Effectively what I want to end up with is something very much like SQL Server 2000 where each service can be stopped and configured and upgraded individually. Therefore, I would also need to be able to remove the indivdual services as well if required.
Will try anything at least once.
FYI: I am using VS2002 EA, Framework 1.0 SP2 and the standard included installer solutions.
Thanks,
Mark
I am trying to create a Windows Service in C# that will install on a single box to support multiple environments. I have created the service and it works perfect. Now however, the client has decided to run multiple environments of the application (a web app) on the one box (i.e. production, acceptance & training). The problem is that the service also needs to run in each environment with it's own configuration settings.
I found an article from this newsgroup from Patrick Lam (MAY 2002) that sounded like it was what I needed but couldn't really get it to work. Is there any examples of how I could modify my existing service code so that the name of the service etc is something I can have entered during the installation process and that information is configured dynamically etc so that multiple copies of the service installation exe's are put into seperate directories and therefore can be totally independant of one another. That way the acceptance environment can be updated with the newer version without affecting production and vice versa.
This way I would run the setup package enter a name (e.g. "Production") and get something like:
Processor Service - Production
installed on the box.
I could then run the setup package again, not get told the product is already installed, and enter another name (e.g. "Acceptance") and end up with:
Processor Service - Acceptance
Processor Service - Production
listed in the Services manager.
Effectively what I want to end up with is something very much like SQL Server 2000 where each service can be stopped and configured and upgraded individually. Therefore, I would also need to be able to remove the indivdual services as well if required.
Will try anything at least once.
FYI: I am using VS2002 EA, Framework 1.0 SP2 and the standard included installer solutions.
Thanks,
Mark