title: How published in Azure my MVC App with support for Identity (Individual User Accounts)?
body: <p>I am developing an MVC App with support for 'Individual User Accounts'. My local App works correctly.
  It generates the database correctly, my code...</p>
  
  <p>IdentityModels.cs</p>
  
  <pre><code>public class ApplicationDbContext : IdentityDbContext&lt;ApplicationUser&gt;
  {
      public ApplicationDbContext()
          : base("DefaultConnection", throwIfV1Schema: false)
      {
          Database.SetInitializer&lt;ApplicationDbContext&gt;(new InitTaxiMetroUserDb());
      }
  
      public static ApplicationDbContext Create()
      {
          return new ApplicationDbContext();
      }
  }
  
  public class InitTaxiMetroUserDb : CreateDatabaseIfNotExists&lt;ApplicationDbContext&gt;
  {
      protected override void Seed(ApplicationDbContext context)
      {
          context.Configuration.LazyLoadingEnabled = true;
  
          if (context.Users.Any(u =&gt; u.UserName == "admin"))
              return;
  
          var store = new UserStore&lt;ApplicationUser&gt;(context);
          var userManager = new UserManager&lt;ApplicationUser&gt;(store);
          var roleManager = new RoleManager&lt;IdentityRole&gt;(new RoleStore&lt;IdentityRole&gt;(context));
  
          if (!roleManager.RoleExists("Administrador"))
              roleManager.Create(new IdentityRole("Administrador"));
          if (!roleManager.RoleExists("Flota"))
              roleManager.Create(new IdentityRole("Flota"));
          if (!roleManager.RoleExists("Gestor"))
              roleManager.Create(new IdentityRole("Gestor"));
          if (!roleManager.RoleExists("Conductor"))
              roleManager.Create(new IdentityRole("Conductor"));
  
          var user = new ApplicationUser { UserName = "admin" };
          var result = userManager.Create(user, "123456");
          if (result.Succeeded)
              userManager.AddToRole(user.Id, "Administrador");
  
          user = new ApplicationUser { UserName = "xxxxx@gmail.com" };
          result = userManager.Create(user, "123456");
          if (result.Succeeded)
              userManager.AddToRole(user.Id, "Gestor");
  
          user = new ApplicationUser { UserName = "yyyyy@yahoo.es" };
          result = userManager.Create(user, "123456");
          if (result.Succeeded)
              userManager.AddToRole(user.Id, "Conductor");
  
          base.Seed(context);
      }
  }
  </code></pre>
  
  <p>Web.config</p>
  
  <pre><code>  &lt;connectionStrings&gt;
  &lt;add name="DefaultConnection" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=TaxiMetroUserDb;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\TaxiMetroUserDb.mdf" providerName="System.Data.SqlClient" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>The problem is when I want to publish this App on Azure: does not generate this DB with which I can not perform the authentication. The DB on´t exists in Azure, it isn´t generate, Why??</p>
  
  <p>How should I do it?</p>
  
  <p>Use migration? ... How I can do it</p>