Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Are Error Controllers/Views Missing From Web.Public In #9068


User avatar
0
rickfrankel created

Hi,

I have the ASP.Net Core & Angular package. I'm running 8.7 (just saw 8.8 released. Upgrade for another day).

I just noticed that on the Web.Public site the Error handler doesn't appear to exist.

Eg: If I go to our site with a made up page to generate a 404 you get this.

ERROR 2020-05-25 10:36:47,018 [20 ] AspNetCore.Server.IIS.Core.IISHttpServer - Connection ID "18374686481282236522", Request ID "8000006b-0000-ff00-b63f-84710c7967bb": An unhandled exception was thrown by the application. System.InvalidOperationException: The view 'Error404' was not found. The following locations were searched: /Views/Error/Error404.cshtml /Views/Shared/Error404.cshtml

This is in the startup.cs

        if (env.IsDevelopment())
        {
            app.UseDeveloperExceptionPage();
        }
        else
        {
            app.UseStatusCodePagesWithRedirects("~/Error?statusCode={0}");
            app.UseExceptionHandler("/Error");
        }

However I don't see any Controller or Views for /Error?

Thanks Rick


1 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    hi Rick

    I will deal with this problem. https://github.com/aspnetzero/aspnet-zero-core/issues/3294