title: vs 2010 reading configuration settings
body: <p>Coding in VB.net in VS 2010.  I have:</p>
  
  <p><code>Imports System.Configuration</code> and I added a reference to System.Configuration.</p>
  
  <p>When</p>
  
  <pre><code>**MsgBox(ConfigurationManager.AppSettings("sDBName").ToString)**
  </code></pre>
  
  <p>is executed, it fails, with "Object reference not set to an instance of an object."
  sDBName is set.</p>
  
  <p>What have I missed?</p>
  
  <hr>
  
  <p>In response:</p>
  
  <p>Sorry for the delay in getting back to you; other things demanded my attention.  </p>
  
  <p>There is no such section in my app.config file.  I added sDBName and other settings via the Settings1.settings file; these objects automatically show up in app.cong as follows:</p>
  
  <pre><code>&lt;applicationSettings&gt;
      &lt;QuickRequest.Settings1&gt;
          &lt;setting name="sDBName" serializeAs="String"&gt;
              &lt;value&gt;xxx&lt;/value&gt;
          &lt;/setting&gt;
          &lt;setting name="sInputPath" serializeAs="String"&gt;
              &lt;value&gt;c:\yyy\Infile\&lt;/value&gt;
          &lt;/setting&gt;
       &lt;/QuickRequest.Settings1&gt;
  </code></pre>
  
  <p></p>