title: HTTP Error 500.30 - ANCM In-Process Start Failure error in ASP.NET Core 2.2
body: <p>I am configuring this application
  <a href="https://docs.microsoft.com/es-es/aspnet/core/security/authentication/accconfirm?view=aspnetcore-2.2&amp;tabs=visual-studio" rel="noreferrer">Confirming the account and recovering passwords in ASP.NET Core</a>
  but I have an error:</p>
  
  <blockquote>
    <p>HTTP Error 500.30 - ANCM In-Process Start Failure Common causes of
    this issue: The application failed to start The application started
    but then stopped The application started but threw an exception during
    startup Troubleshooting steps: Check the system event log for error
    messages Enable logging the application process' stdout messages
    Attach to debugger to the application process and inspect http 500
    when replacing this code in IdentityHostingStartup</p>
  </blockquote>
  
  <p>Below is my configuration:</p>
  
  <pre><code>[assembly: HostingStartup(typeof(Misioneros.Stella.Maris.Web.Areas.Identity.IdentityHostingStartup))]
  namespace Misioneros.Stella.Maris.Web.Areas.Identity
  {
      public class IdentityHostingStartup : IHostingStartup
      {
          public void Configure(IWebHostBuilder builder)
          {
              builder.ConfigureServices((context, services) =&gt; {
                  services.AddDbContext&lt;ApplicationDbContext&gt;(options =&gt;
                      options.UseSqlServer(
                          context.Configuration.GetConnectionString("DefaultConnection")));
  
                  services.AddDefaultIdentity&lt;IdentityUser&gt;(config =&gt;
                  {
                      config.SignIn.RequireConfirmedEmail = true;
                  })
                      .AddEntityFrameworkStores&lt;ApplicationDbContext&gt;();
              });
          }
      }
  }
  </code></pre>
  
  <p>Any idea what is the problem?</p>