Hi all,
I am trying to install a service using dynamic naming. I wrote values in the
configuration file, and trying to assign one of those values to a string,
and using this string as the name of the installer
<?xml version="1.0" encoding="utf-8" ?>
<configuratio n>
<appSettings>
<add key="StringName " value="StringVa lue" />
</appSettings>
</configuration>
//Code in the service installer
str=System.Conf iguration.Confi gurationSetting s.AppSettings["StringName "];
this.serviceIns taller1.Service Name=str;
when using the installutil tool, I get the following exception:
An exception occurred during the Install phase.
System.Argument Exception: Must specify value for source.
Usually, if I write the string value in a normal text file, and read the
value from the file while installing (instead of reading from the
appSettings element) I don't get any exceptions and it works fine..
So what could be the reason then? and normally how can you set a dynamic
service name using the configuration file?
Thank you for your help
--
Rami Saad
Microsoft GTSC Developer support for Middle East