title: problem with Web.config wiring a database
body: <pre><code>&lt;connectionStrings&gt;
        &lt;add name ="MyDB" connectionString ="Data Source=.\SQLEXPRESS" providerName="System.Data.SqlClient"/&gt;
      &lt;/connectionStrings&gt;
  </code></pre>
  
  <p>I've wired the above however I keep getting the following:</p>
  
  <pre><code>System.Configuration.ConfigurationErrorsException: The requested database MyDb is not defined in configuration.
  </code></pre>
  
  <p>Is there something wrong with the wiring or is the problem located within my code?</p>
  
  <pre><code>DatabaseFactory.CreateDatabase(DB_NAME) 
  </code></pre>
  
  <p>Problem was solved I put the connection in the service config file, however all posts were helpful</p>