title: How to set Connection String in ASP.Net Identity
body: <p>I have a problem.  I create a project asp.net mvc 5.  I migrate all library owin and other in class library.
  And I use this class library to create user,loggin and other.
  But now, I see that a mdf is create in app_data and the problem when I create a user or other, the database is not changes and not create.</p>
  
  <p>I think all information are in the mdf file, because if relaunch the application the loggin work.
  I try many solution on this post:
  <a href="https://stackoverflow.com/questions/17012839/cannot-attach-the-file-mdf-as-database">Cannot attach the file *.mdf as database</a> (add/remove attachfile in web.config, stop/delete sqllocaldb) but nothing works.</p>
  
  <p>My web.config is main application(not in library class) is like this:</p>
  
  <pre><code>&lt;configSections&gt;
  &lt;!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --&gt;
  &lt;section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /&gt;
  &lt;/configSections&gt;
  &lt;connectionStrings&gt;
  &lt;add name="DefaultConnection" connectionString="Data Source=(localdb)\v11.0;initial catalog=WebMVCDataBase;integrated security=True;pooling=False;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" /&gt;
  &lt;/connectionStrings&gt;
  &lt;appSettings&gt;
  &lt;add key="webpages:Version" value="3.0.0.0" /&gt;
  &lt;add key="webpages:Enabled" value="false" /&gt;
  &lt;add key="ClientValidationEnabled" value="true" /&gt;
  &lt;add key="UnobtrusiveJavaScriptEnabled" value="true" /&gt;
  &lt;add key="userconnection" value="Data Source=(localdb)\v11.0;initial catalog=WebMVCDataBase;integrated security=True;pooling=False;MultipleActiveResultSets=True" /&gt;
  &lt;/appSettings&gt;
  </code></pre>
  
  <p>and my Application dbcontext is like this:</p>
  
  <pre><code>  public class ApplicationDbContext : IdentityDbContext&lt;ApplicationUser&gt;
  {
      public ApplicationDbContext()
          : base("userconnection", throwIfV1Schema: false)
      {
          //Database.SetInitializer&lt;ApplicationDbContext&gt;(new CreateDatabaseIfNotExists&lt;ApplicationDbContext&gt;()); I try this but not work
      }
  
  
      public static ApplicationDbContext Create()
      {
  
          return new ApplicationDbContext();
      }
  }
  </code></pre>
  
  <p>thanks for your help</p>