title: How to use the value of appSettings from App.Config file when creating a Windows Service
body: <p>I am trying to create a Windows Server. I have some logic in C#</p>
  
  <pre><code>        string urlToPing = ConfigurationSettings.AppSettings["UrlToPing"].ToString();
          Stream data = client.OpenRead(urlToPing);
  </code></pre>
  
  <p>I need to read </p>
  
  <p>Here my App.Config</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;configuration&gt;
    &lt;appSettings&gt;
      &lt;add key="UrlToPing" value="http://mysite.com"/&gt;
    &lt;/appSettings&gt;
  
  &lt;/configuration&gt;
  </code></pre>
  
  <p>I am new at Windows Services, my questions:</p>
  
  <ul>
  <li>When I publish to folder the Service or if I create a build I cannot
  see the App.Config file
  <ul>
  <li>Visual Studio warning on ConfigurationSettings.AppSettings as obsolete (what should I use instead?)</li>
  </ul></li>
  </ul>