开发者

running 2 windows services using different versions of the same application

开发者 https://www.devze.com 2022-12-17 07:39 出处:网络
I have a server application that I install as a Windows service. I want to run two different versions of the same thing on the same server, they differ by the build I am on and the configuration. 开发

I have a server application that I install as a Windows service. I want to run two different versions of the same thing on the same server, they differ by the build I am on and the configuration. 开发者_开发问答One being a beta version and the other being the live version. I can install two separate copies of the application on the server just fine but I can only start up on of them as a service at a time. Each service starts up fine if it is the only one. Any thoughts?

I am testing this on Windows 7 and on Server 2008.


The service name you register has to be unique. I add an instance ID to my service name when doing this type of thing.


Yep, as Brad says the name has to be unique (+1). And be careful what you pick, because it has to be unique in all space and time... We have had a service running on our windows servers for many years called "monitor" (it monitored processes). Imagine how overjoyed we were when Microsoft decided to add a service to Windows called... "monitor". Imagine our mirth as our installs started silently failing. Oh, how we laughed.

Pick your name carefully :-)

0

精彩评论

暂无评论...
验证码 换一张
取 消