title: Permission denied for ASP.NET app to access database
body: <p>I have a Sitefinity ASP.NET web site which has a database <code>Db1</code>. I have the database attached to SQL Server Management Studio.</p>
  
  <p>When I run the ASP.NET application, it doesn't seem to have permission to access the database. Sitefinity fails to connect to the existing db, then tries to create a new db, which it throws this error:</p>
  
  <blockquote>
    <p>CREATE DATABASE permission denied in database 'master'</p>
  </blockquote>
  
  <p>The connection string is:</p>
  
  <pre><code>&lt;add connectionString="data source=localhost\sqlexpress;Integrated Security=SSPI;initial catalog=Db1" providerName="System.Data.SqlClient" dbType="MsSql" name="Sitefinity" /&gt;
  </code></pre>
  
  <p>In SQL Management Studio, I connect to the localhost\SQLEXPRESS instance using Windows Authentication.</p>
  
  <p>I think the problem is, I need to give the ASP.NET process user, permission to access the database <code>Db1</code>. Where can I find this user and how can I give permission?</p>
  
  <p>I'm also unsure if the app should be using a proper SQL Server user to connect instead of Windows Authentication.</p>