title: How to attach .mdf file to .SQLEXPRESS
body: <p>Tried this in as connection string</p>
  
  <pre><code>connectionString="Server=.\SQLEXPRESS;
      AttachDbFilename=E:\Database\dnn49.mdf;Database=dnn49; 
      Trusted_Connection=Yes;" 
  </code></pre>
  
  <p>but i get an error</p>
  
  <blockquote>
    <p>Unable to open the physical file
    "E:\Database\dnn49.mdf".
    Operating system error 5: "5(Access is
    denied.)". Cannot attach the file
    'E:\Database\dnn49.mdf'
    as database 'dnn49'.</p>
  </blockquote>
  
  <p>What gives?</p>