Install a windows service twice
am 15.10.2007 11:14:00 von FreeNEasy
Hi,
i have written a windows service which synchronizes data between databases.
This service is running on a database server which holds production and test
databases.
Data access takes place using webservices.
Information on webservice URLs and database connection strings are stored in
the applocation configuration file (app.exe.config).
After doing some changes on the service I now need to install a test version
of this service with different config-settings (URLs and connectionstrings of
test webservices and test databases).
How can I install a new test-version of my service without affecting the
running production service?
regards
Michael
RE: Install a windows service twice
am 16.10.2007 04:47:10 von stcheng
Hello Michael,
From your descrpition, you have an .NET built windows service which will
pickup some values from app.config file to initialize some components. Now,
you 're wondering how to install a test service with some test data(in
config file) without affect the existing running service, right?
Regarding on this issue, here are some of my suggestion:
For windows service, in .NET I think you've used an ServiceInstaller class
(and the InstallUtil.exe tool) to install it, right? If so, you can open
the autogenerated code section of your installer class and you'll find the
following like code:
<<<<<<<<<<<<<<<<<<<<<
// serviceInstaller1
//
this.serviceInstaller1.Description = "My Install Service
Description";
this.serviceInstaller1.DisplayName = "My Install Service";
this.serviceInstaller1.ServiceName = "Service1";
>>>>>>>>>>>>>>>>>>>>>
these indicate the properties that the installer will set for your windows
service, and the "ServiceName" is the most important one since it identify
a service. For your test service, you can modified these properties to some
test that representing a testing service. Also, you can double click the
installer class and see these properites setting in the Properties
window(when you select the installer class in component panel):
#ServiceInstaller Class
http://msdn2.microsoft.com/en-us/library/system.serviceproce ss.serviceinstal
ler.aspx
After you modify this and build to run the new installer one, it will
install the service under a different identity separated from the original
one. What do you think?
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/de fault.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx .
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: =?Utf-8?B?RnJlZU5FYXN5?=
>Subject: Install a windows service twice
>Date: Mon, 15 Oct 2007 02:14:00 -0700
>
>Hi,
>
>i have written a windows service which synchronizes data between
databases.
>This service is running on a database server which holds production and
test
>databases.
>Data access takes place using webservices.
>Information on webservice URLs and database connection strings are stored
in
>the applocation configuration file (app.exe.config).
>
>After doing some changes on the service I now need to install a test
version
>of this service with different config-settings (URLs and connectionstrings
of
>test webservices and test databases).
>
>How can I install a new test-version of my service without affecting the
>running production service?
>
>regards
>Michael
>
>
Re: Install a windows service twice
am 16.10.2007 06:17:28 von MR. Arnold
"FreeNEasy" wrote in message
news:600CFE47-3DFE-4E99-AECC-4DDDF35A9A08@microsoft.com...
> Hi,
>
> i have written a windows service which synchronizes data between
> databases.
> This service is running on a database server which holds production and
> test
> databases.
> Data access takes place using webservices.
> Information on webservice URLs and database connection strings are stored
> in
> the applocation configuration file (app.exe.config).
>
> After doing some changes on the service I now need to install a test
> version
> of this service with different config-settings (URLs and connectionstrings
> of
> test webservices and test databases).
>
> How can I install a new test-version of my service without affecting the
> running production service?
>
I think it's kind of simple. You make a new name for the service called
"TestService" as an example and install it and make the Web service
TestWebService in the name.
Why do you need to make it anymore complicated than that?