.NET 6 Application No Need To Configure Developer Exception Page Middleware Explicitly[.NET6 Feature]
In this article, we will get to know about a feature of .Net 6 that is 'no need to configure developer exception page middleware explicitly because the framework will automatically enable developer exception page for the Development environment'.
.NET 5 or Below Version Application Developer Exception Page Middleware:
For bugs identification, the developer exception page is very helpful for debugging. For .NET5 or Below version application developer exception page middleware is always configured in the 'Startup.cs' file based on the environmental variable that is 'Development'.
Startup.cs:
This middleware renders a well-designed exception page with a full exception stack trace as below.
.NET6 Application:
From .NET6 application no need to configure developer exception page middleware explicitly. By default, the framework will load the developer exception page if the environment variable is 'Development'.
Program.cs:But still, we can see the developer exception page in the Development environment on exception occurs as below.
Support Me!
Buy Me A Coffee
PayPal Me
Video Session:
Wrapping Up:
Hopefully, I think this article delivered some useful information on no explicit configuration of Developer Exception Page Middleware from .NET6. I love to have your feedback, suggestions, and better techniques in the comment section below.
Comments
Post a Comment