Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
When I set up the Umbraco runtime to 'production', the custom Error controller I have in place to display the 500 errors is not hit.
The controller is just this.
[Route("Error")] public class ErrorController : Controller { public IActionResult Index() { return View("Index"); } }
This is my Startup.cs
public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { if (env.IsDevelopment() || env.EnvironmentName == "Int") { app.UseDeveloperExceptionPage(); } else { app.UseExceptionHandler("/Error"); app.UseHsts(); } app.UseHttpsRedirection(); app.Use(async (context, next) => { context.Response.Headers.Add("X-Frame-Options", "SAMEORIGIN"); context.Response.Headers.Add("X-Content-Type-Options", "nosniff"); context.Response.Headers.Add("X-XSS-Protection", "1; mode=block"); await next(); }); app.UseMvc(routeBuilder => { routeBuilder.Expand().Select().Filter().OrderBy().MaxTop(100).Count().SetTimeZoneInfo(TimeZoneInfo.Utc); routeBuilder.MapRestier(u => { u.MapApiRoute<AcpccApi>("ApiV1", "dataApi", true); }); routeBuilder.EnableDependencyInjection(); }); app.UseRouting(); app.UseUmbraco() .WithMiddleware(u => { u.UseBackOffice(); u.UseWebsite(); }) .WithEndpoints(u => { u.UseInstallerEndpoints(); u.UseBackOfficeEndpoints(); u.UseWebsiteEndpoints(); }); }
If I remove the runtime setting from appsettings.json, the custom error is displayed.
I found this opened ticket. It seems related to this. https://github.com/umbraco/Umbraco-CMS/issues/13052
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Exception Handler not hit when Runtime is 'Production'
When I set up the Umbraco runtime to 'production', the custom Error controller I have in place to display the 500 errors is not hit.
The controller is just this.
This is my Startup.cs
If I remove the runtime setting from appsettings.json, the custom error is displayed.
I found this opened ticket. It seems related to this. https://github.com/umbraco/Umbraco-CMS/issues/13052
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.