title: Setting connection strings in ASP.net
body: <p>I am attempting to set my connection string for a MongoDB within the web.config
  file.</p>
  
  <p>I have the following :</p>
  
  
  
  
  
  <pre><code>&lt;configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"&gt;
    &lt;appSettings&gt;
      &lt;add key="MongoConnect" value="mongodb://localhost" /&gt;
    &lt;/appSettings&gt;
  
    &lt;connectionStrings&gt;
      &lt;add name="Mongo" connectionString="mongodb://localhost"/&gt;
    &lt;/connectionStrings&gt;
  
    &lt;system.web&gt;
    &lt;/system.web&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>I then try and access it using the WebConfigurationManager looking in both the ConnectionStrings and AppSettings collections, but neither have my values.</p>
  
  <p>By the way I have this is both Web.Debug.config and Web.Release.config</p>
  
  <p>What am I doing wrong?</p>