Closed Jimmys20 closed 1 year ago
Hi @Jimmys20! 👋🏻
Unfortunately, there's no way to turn off the developer exception page middleware using the minimal hosting model. See this SO answer for more details.
Thanks for your reply, on Stackoverflow it is stated that "DeveloperExceptionPageMiddleware is executed after all custom registered middlewares". Does this mean that if I use app.UseProblemDetails();
with minimal hosting model the response will be actually handled by the ProblemDetailsMiddleware
before DeveloperExceptionPageMiddleware
is reached?
Yeah, I think that should be the case 👍🏻
Hello, in ASP.NET Core 6 the developer exception page that used to be enabled using
if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); }
is now enabled by default in Development environment. Any idea how to disable this behaviour and remove this middleware? How can I make the Problem Details middleware handle the error responses in development mode?