title: windows service cannot read app.config C#
body: <p>I have created a windows service and there is an app.config that goes with it. After using the InstallUtil utility my service has installed and in the directory of the service it has correctly transformed the app.config file into the servicename.config file. When I check the file the AppSettings have all the keys that I expect. In my code I have the following line essentially in the OnStart event:</p>
  
  <pre><code>string timeToRun = ConfigurationManager.AppSettings["RunTime"];
  </code></pre>
  
  <p>In the windows event viewer it tells me the exception was thrown due to System.Configuration.ConfigurationErrorsException</p>