473,323 Members | 1,622 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

dynamic windows service name

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" ?>

<configuration>

<appSettings>

<add key="StringName" value="StringValue" />

</appSettings>

</configuration>

//Code in the service installer

str=System.Configuration.ConfigurationSettings.App Settings["StringName"];

this.serviceInstaller1.ServiceName=str;

when using the installutil tool, I get the following exception:

An exception occurred during the Install phase.

System.ArgumentException: 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

Nov 20 '05 #1
0 795

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Rami Saad | last post by:
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...
8
by: Eyeawanda Pondicherry | last post by:
I have put some code together that creates an enum dynamically from some database values. The enum can be read perfectly by an application that references the dynamically generated dll. If I...
15
by: Nak | last post by:
Hi there, Is it possible to load a web service dynamically? i.e. If the web service were to exist on a system with a non static IP address, an application could download a "locator" file that...
1
by: Scott Davies | last post by:
Hi, I'm looking for some help on a small program that I'm trying to develop in VB.NET. I'm having trouble getting the code that I've written to work, can anyone shed some light as to where I'm...
0
by: Scott Davies | last post by:
Hi, I'm looking for some help on a small program that I'm trying to develop in VB.NET. The program I'm trying to develop needs to be able to do the following: - Select remote server -...
7
by: Mike Livenspargar | last post by:
We have an application converted from v1.1 Framework to v2.0. The executable references a class library which in turn has a web reference. The web reference 'URL Behavior' is set to dynamic. We...
4
by: tshad | last post by:
What would be a good way to check programmatically whether a service was running? We have a service that dies periodically and I need to check to see if this service is running. I know how to...
2
by: assgar | last post by:
Hi Developemnt on win2003 server. Final server will be linux Apache,Mysql and PHP is being used. I use 2 scripts(form and process). The form displays multiple dynamic rows with chechboxs,...
1
by: =?Utf-8?B?Sm9yZGFuIFou?= | last post by:
We did a same code base test between 1.1 and 3.5. In 1.1, when your .NET application reference a library with web reference (dynamic), you can always easily overwrite the default URL by...
5
by: dm3281 | last post by:
I'm really starting to hate writing services -- or trying to, anyway. Why do I need to rename my project to the service name? Why do I need to set the "ServiceName" property to my service name?...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.