title: "Cannot open database - login failed" . Works in Management Studio, not code
body: <p>Oh yes, the famous error:</p>
  
  <blockquote>
    <p>Cannot open database "MYDBNAME" requested by the login. The login failed. Login failed for user 'USERNAME'.</p>
  </blockquote>
  
  <p><strong>Let me explain my situation:</strong></p>
  
  <p>I have a database server, which has a SA account and my user account. The user has the correct mappings to my database (dbowner).</p>
  
  <p>I can open the database with this user, using SQL Management Studio 2008 R2, both on the SQL server itself (using localhost), and on my frontend server.</p>
  
  <p>However, when I run my application, I get the login failed error. </p>
  
  <p>Strange thing is I have a test application and a production application on our frontend server. The test application has test databases on the same database server, and there are no login problems here. The only difference between the two, are the prefix which differs from "TEST" to "PROD". The test application works, the production however, doesn't. The user mappings and seem it should work on both.</p>
  
  <p>Any ideas?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Our connectionstring:</p>
  
  <pre><code>&lt;add key="umbracoDbDSN" value="Server=Websqlsrv01;Database=PROD_Databasename;User ID=umbraco_user;Password=password;Trusted_Connection=False" /&gt;
  </code></pre>