title: ASP.NET Website Administration Tool: Unable to connect to SQL Server database
body: <p>I am trying to get authentication and authorization working with my ASP MVC project.  I've run the aspnet_regsql.exe tool without any problem and see the aspnetdb database on my server (using the Management Studio tool).</p>
  
  <p>my connection string in my web.config is:</p>
  
  <blockquote>
  <pre><code> &lt;connectionStrings&gt;
   &lt;add name="ApplicationServices"
       connectionString="data source=MYSERVERNAME;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true"
       providerName="System.Data.SqlClient" /&gt;
   &lt;/connectionStrings&gt; 
  </code></pre>
  </blockquote>
  
  <p>The error I get is: </p>
  
  <blockquote>
    <p>There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store. </p>
    
    <p>The following message may help in diagnosing the problem: Unable to connect to SQL Server database. </p>
  </blockquote>
  
  <p>In the past, <a href="https://serverfault.com/questions/130434/how-do-i-login-to-sql-server-without-having-to-use-run-as-administrator-when-st">I have had trouble connecting to my database</a> because I've needed to add users.   Do I have to do something similar here?</p>
  
  <p><strong>Edit</strong>
  Changing the connection string ultimately solved the problem.
  For the records I am using VS2010, ASP MVC2, SServer 2008</p>
  
  <blockquote>
  <pre><code>&lt;connectionStrings&gt;
  &lt;add name="ApplicationServices"
       connectionString="data source=MYSERVERNAME;Integrated Security=True;Initial Catalog=aspnetdb"
       providerName="System.Data.SqlClient" /&gt;
  &lt;/connectionStrings&gt;
  </code></pre>
  </blockquote>