HTTP Error 500.30 - ANCM In-Process Start Failure error in ASP.NET Core 2.2

César Desu picture César Desu · Jan 18, 2019 · Viewed 25.9k times · Source

I am configuring this application Confirming the account and recovering passwords in ASP.NET Core but I have an error:

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

Below is my configuration:

[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) => {
                services.AddDbContext<ApplicationDbContext>(options =>
                    options.UseSqlServer(
                        context.Configuration.GetConnectionString("DefaultConnection")));

                services.AddDefaultIdentity<IdentityUser>(config =>
                {
                    config.SignIn.RequireConfirmedEmail = true;
                })
                    .AddEntityFrameworkStores<ApplicationDbContext>();
            });
        }
    }
}

Any idea what is the problem?

Answer

Bryan B picture Bryan B · Jan 22, 2019

I've had the 500.30 error due to the duplicate identity problem cited by TanvirArjel, but I also just encountered the error when my appsettings.json file had some bad JSON in it. Not sure if that would only occur if you're actually trying to use configuration values in Startup.