title: Login Failed - LocalDB, EF, WebSecurity
body: <p>I have a domain-model and a webGUI in form of a MVC-project, I havent migrated any of the DB-content when changes has been made to the domain-model, instead i have just changed the "Initial Catalog" in the connectionstring to a new name and the localDB has just created a new(Maybe a dumb way to do it but it has worked)</p>
  
  <p>Now i have added Websecurity, it worked like a charm the first time, but when i change the name on "initial catalog" i get a;</p>
  
  <p><strong>"Cannot open database "Dev1" requested by the login. The login Failed"</strong></p>
  
  <p><strong>"Login Failed for user 'My-Comuter\MyUser"</strong></p>
  
  <p>on this line in  Application_Start(); </p>
  
  <pre><code>WebSecurity.InitializeDatabaseConnection("EFDbContext", "UserProfile", "UserId", "UserName", autoCreateTables: true);
  </code></pre>
  
  <p>If I the changes to the domain-model and change back the name on the "Inital Catalog" it works.</p>
  
  <p>My connectionstring looks like this;</p>
  
  <pre><code>&lt;add name="EFDbContext" connectionString="Data Source=(localDB)\v11.0; Initial Catalog = Dev1;Integrated Security=True; MultipleActiveResultSets=True; Trusted_Connection=True" providerName="System.Data.SqlClient" /&gt;
  </code></pre>
  
  <p>and the context class like this;</p>
  
  <pre><code>using MyApp.Domain.Entities;
  using System.Data.Entity;
  
  namespace MyApp.Domain.Concrete
  {
      public class EFDbContext : DbContext
      {
          public DbSet&lt;SomeData&gt; SomeDataSet{ get; set; }    
          public DbSet&lt;UserProfile&gt; UserProfiles { get; set; }
  
      }       
  }
  </code></pre>
  
  <p><strong>If i havent added enought information or code, just say the word and i will try to provide it</strong></p>
  
  <p>Is there anything wrong in the connectionstring or EFDContext implementation? Any input would be appriciated:)</p>