Hello,
I have coded a windows service. It runs, starts, stops or works fine. But I am using hard coded configurable values in the code, which is not a good practice. I would rather use the App.config file. Except, I am unable to. Whenever I modify the App.config, for example as shown below..
<configuration>
<appSettings>
<addkey="production"value="y"/>
</appSettings>
and then in my source code files try to access the configuration setting, for example with code
if (ConfigurationManager.AppSettings["production"] == "y")
my service fails to start. It gives me the following error message, when I try to start it..
"Windows could not start the <ServiceNameHere< service on Local Computer
Error 1053: The service did not respond to the start or control request in a timely fashion."
Please note I am able to compile & install the service (using installutil command), just fine. The problem is that it never starts.
Help Appreciated. thank you
diana4