Re-execute the middleware pipeline with the StatusCodePages Middleware to create custom error pages

added by DotNetKicks
3/27/2017 3:39:22 PM

2 Kicks, 158 Views

By default, the ASP.NET Core templates include either the ExceptionHandlerMiddleware or the DeveloperExceptionPage. Both of these catch exceptions thrown by the middleware pipeline, but they don't handle error status codes that are returned by the pipeline (without throwing an exception). For that, there is the StatusCodePagesMiddleware.


0 comments