title: ConfigurationManager.AppSettings returning null
body: <p>I am using ConfigurationManager.AppSettings["smtpHost"] to read a value from the app.config file in my business logic layer, but the value returned is always null, even though the key exists and it has a value, Does any one know why?</p>
  
  <p>App.config file in BLL:</p>
  
  <pre><code>&lt;appSettings&gt;
    &lt;add key="smtpHost" value="smtp.gmail.com" /&gt;
  &lt;/appSettings&gt;
  </code></pre>
  
  <p>I added the same thing to the web.config file. </p>
  
  <p>And I try to get;</p>
  
  <pre><code>var host = ConfigurationManager.AppSettings["smtpHost"];
  </code></pre>