-
Simply show a welcome page to indicate that the app is working properly. This sample does not use a startup class simply because it's just a one line code.
-
Show any unhandled exception in a nicely formatted page with error details. Only use this in development environment!
-
Use
IExceptionHandlerFeature
feature provided byMicrosoft.AspNetCore.Diagnostics.Abstractions
to create custom global exception page. -
Custom Global Exception Page - 2
Similar to the previous one except that that we use the custom error page defined in separate path.
-
Use
UseStatusCodePagesWithRedirects
. Beware: This extension method handles your 5xx return status code by redirecting it to a specific url. It will not handle your application exception in general (for this useUseExceptionHandler
- check previous samples).
dotnet8