HTTP Error 500.30 - ANCM In-Process Start Failure .NET Core

0

I am using .NET Core 3.0 and suddenly I am getting error below, yes it was working fine last week:-

Nonetheless something has changed and I can't workout what - seems to be related to a directory being wrong. I have deleted the .vs hoping it would work after it is regenerated...

Error

I have followed below links but to no avail...

HTTP Error 500.30 - ANCM In-Process Start Failure

Reading and using appsettings.json in Program.cs?

https://forums.asp.net/t/2159371.aspx?Application+LM+W3SVC+10+ROOT+failed+to+start+process+ErrorCode+0x80070005+

Dotnet Core Multiple Startup Classes with In-Process Hosting

The Event Viewer shows:-

enter image description here

Adding StartUp.cs

public class Startup
{
    public Startup(IConfiguration configuration)
    {
        Configuration = configuration;
    }

    public IConfiguration Configuration { get; }

    // This method gets called by the runtime. Use this method to add services to the container.
    public void ConfigureServices(IServiceCollection services)
    {
        services.AddMvc();

        services.AddAuthorization(options =>
        {
            options.AddPolicy("ADGroup", policy =>
                policy.Requirements.Add(new UserHelper.CheckAdGroupRequirement(Configuration["SecuritySettings:ADGroup"])));
        });

        services.AddSingleton<IAuthorizationHandler, UserHelper.CheckAdGroupHandler>();
        services.AddHttpContextAccessor();
    }

    // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
    public static void Configure(IApplicationBuilder app, IWebHostEnvironment env)
    {
        if (env.IsDevelopment())
        {
            app.UseDeveloperExceptionPage();

        }
        else
        {
            app.UseExceptionHandler("/Home/Error/{0}");
            // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
            app.UseHsts();
        }

        app.UseHttpsRedirection();
        app.UseStaticFiles();
        app.UseRouting();

        app.UseAuthentication();
        app.UseAuthorization();

        app.UseEndpoints(endpoints =>
        {
            endpoints.MapRazorPages();
            endpoints.MapControllerRoute(
                name: "default",
                pattern: "{controller=Home}/{action=Index}/{id?}");
        });


    }
}

A nudge in the right direction would be highly appreciated....

c#
iis-express
appsettings
asp.net-core-3.0
asked on Stack Overflow Dec 18, 2019 by Maiur Laximidas • edited Dec 18, 2019 by Maiur Laximidas

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0