title: 'No database provider has been configured for this DbContext' on SignInManager.PasswordSignInAsync
body: <blockquote>
  <p>.Net Core 1.0.0 - SDK Preview 2 (x64)</p>
  <p>.Net Core 1.0.0 - VS &quot;15&quot; Preview 2 (x64)</p>
  <p>.Net Core 1.0.0 - Runtime (x64)</p>
  </blockquote>
  <p>So, we updated an RC1 app to the latest versions above. After many hours of switching references, it's running. However, when logging in (AccountController/Login), I am getting an error at:</p>
  <pre><code>public class AccountController : BaseController
  {
      public UserManager&lt;ApplicationUser&gt; UserManager { get; private set; }
      public SignInManager&lt;ApplicationUser&gt; SignInManager { get; private set; }
      private readonly IEmailSender EmailSender;
  
      public AccountController(UserManager&lt;ApplicationUser&gt; userManager, SignInManager&lt;ApplicationUser&gt; signInManager, IEmailSender emailSender)
      {
          UserManager = userManager;
          SignInManager = signInManager;
          EmailSender = emailSender;
      }
  
      // GET: /Account/Login
      [HttpGet]
      [AllowAnonymous]
      public IActionResult Login(string returnUrl = null)
      {
          ViewBag.ReturnUrl = returnUrl;
          return View();
      }
  
      //
      // POST: /Account/Login
      [HttpPost]
      [AllowAnonymous]
      [ValidateAntiForgeryToken]
      public async Task&lt;IActionResult&gt; Login(ViewModels.Account.LoginViewModel model, string returnUrl = null)
      {
          if (ModelState.IsValid)
          {
              // Errs this next line
              var result = await SignInManager.PasswordSignInAsync(model.Email, model.Password, model.RememberMe, false); // &lt;-- ERRS HERE '.PasswordSignInAsync'
              if (result.Succeeded)
                  return RedirectToLocal(returnUrl);
  
              ModelState.AddModelError(&quot;&quot;, &quot;Invalid email or password.&quot;);
              return View(model);
          }
  
          // If we got this far, something failed, redisplay form
          return View(model);
      }
              
  </code></pre>
  <p>It blows up with the following error message:</p>
  <blockquote>
  <p>InvalidOperationException: No database provider has been configured for this DbContext. A provider can be configured by overriding the DbContext.OnConfiguring method or by using AddDbContext on the application service provider. If AddDbContext is used, then also ensure that your DbContext type accepts a DbContextOptions object in its constructor and passes it to the base constructor for DbContext.</p>
  </blockquote>
  <p>Here is the Startup.cs:</p>
  <pre><code>public void ConfigureServices(IServiceCollection services)
      {
          services.Configure&lt;AppSettings&gt;(Configuration.GetSection(&quot;AppSettings&quot;));
  
          // Add EF services to the services container.
          services.AddEntityFrameworkSqlServer()
             .AddDbContext&lt;LogManagerContext&gt;(options =&gt;
                options.UseSqlServer(Configuration[&quot;Data:DefaultConnection:Connectionstring&quot;]));
  
          services.AddSingleton(c =&gt; Configuration);
  
          // Add Identity services to the services container.
          services.AddIdentity&lt;ApplicationUser, IdentityRole&gt;()
              .AddEntityFrameworkStores&lt;LogManagerContext&gt;()
              .AddDefaultTokenProviders();
              
          
          // Add MVC services to the services container.
          services.AddMvc();
  
          services.AddTransient&lt;IHttpContextAccessor, HttpContextAccessor&gt;();
  
          //Add all SignalR related services to IoC. - Signal R not ready yet - Chad
          //services.AddSignalR();
  
          //Add InMemoryCache
          services.AddMemoryCache();
  
          services.AddSession(options =&gt;
          {
              options.IdleTimeout = System.TimeSpan.FromHours(1);
              options.CookieName = &quot;.LogManager&quot;;
          });
  
          // Uncomment the following line to add Web API servcies which makes it easier to port Web API 2 controllers.
          // You need to add Microsoft.AspNet.Mvc.WebApiCompatShim package to project.json
          // services.AddWebApiConventions();
          // Register application services.
          services.AddTransient&lt;IEmailSender, AuthMessageSender&gt;();
          
      }
  
      // Configure is called after ConfigureServices is called.
      public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
      {
          app.UseSession();
  
          // Configure the HTTP request pipeline.
          // Add the console logger.
          //loggerFactory.MinimumLevel = LogLevel.Information; - moved to appsettings.json -chad
          loggerFactory.AddConsole();
          loggerFactory.AddDebug();
  
          loggerFactory.AddNLog();
  
          // Add the following to the request pipeline only in development environment.
          if (env.IsDevelopment())
          {
              app.UseBrowserLink();
              app.UseDeveloperExceptionPage();
              //app.UseDatabaseErrorPage(DatabaseErrorPageOptions.ShowAll);
          }
          else
          {
              // Add Error handling middleware which catches all application specific errors and
              // sends the request to the following path or controller action.
              app.UseExceptionHandler(&quot;/Home/Error&quot;);
          }
  
          env.ConfigureNLog(&quot;NLog.config&quot;);
  
          // Add static files to the request pipeline.
          app.UseStaticFiles();
  
          // Add cookie-based authentication to the request pipeline.
          app.UseIdentity();
  
          //SignalR
          //app.UseSignalR();
  
          // Add MVC to the request pipeline.
          app.UseMvc(routes =&gt;
          {
              routes.MapRoute(
               name: &quot;default&quot;,
               template: &quot;{controller}/{action}/{id?}&quot;,
               defaults: new { controller = &quot;Home&quot;, action = &quot;Index&quot; }
               );
  
              // Uncomment the following line to add a route for porting Web API 2 controllers.
              // routes.MapWebApiRoute(&quot;DefaultApi&quot;, &quot;api/{controller}/{id?}&quot;);
          });
      }
  </code></pre>
  <p>And here's the Context:</p>
  <pre><code>public class ApplicationUser : IdentityUser
  {
      // Add Custom Profile Fields
      public string Name { get; set; }
  }
  
  public class LogManagerContext : IdentityDbContext&lt;ApplicationUser&gt;
  {
      public DbSet&lt;LogEvent&gt; LogEvents { get; set; }
      public DbSet&lt;Client&gt; Clients { get; set; }
      public DbSet&lt;LogEventsHistory&gt; LogEventsHistory { get; set; }
      public DbSet&lt;LogEventsLineHistory&gt; LogEventsLineHistory { get; set; }
      public DbSet&lt;LogRallyHistory&gt; LogRallyHistory { get; set; }
      public DbSet&lt;Flag&gt; Flags { get; set; }
      protected override void OnModelCreating(ModelBuilder builder)
      {
  
          builder.Entity&lt;LogEvent&gt;().HasKey(x =&gt; x.LogId);
          builder.Entity&lt;LogEvent&gt;().ToTable(&quot;LogEvents&quot;);
          builder.Entity&lt;Client&gt;().HasKey(x =&gt; x.ClientId);
          builder.Entity&lt;Client&gt;().ToTable(&quot;Clients&quot;);
          builder.Entity&lt;LogEventsHistory&gt;().HasKey(x =&gt; x.HistoryId);
          builder.Entity&lt;Flag&gt;().HasKey(x =&gt; x.FlagId);
          builder.Entity&lt;Flag&gt;().ToTable(&quot;Flags&quot;);
          builder.Entity&lt;LogRallyHistory&gt;().HasKey(x =&gt; x.HistoryId);
          builder.Entity&lt;LogEventsLineHistory&gt;().HasKey(x =&gt; x.LineHistoryId);
  
          base.OnModelCreating(builder);
      }
  </code></pre>