-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed as duplicate of#56906
Labels
area-middlewareIncludes: URL rewrite, redirect, response cache/compression, session, and other general middlewaresIncludes: URL rewrite, redirect, response cache/compression, session, and other general middlewares
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
When running the code below from VS, I'm always getting the development exception page even though I commented out the code that activates it.
Am I missing something?
public class Program
{
public static void Main(string[] args)
{
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();
//if (app.Environment.IsDevelopment())
// app.UseDeveloperExceptionPage();
app.MapGet("/",
(HttpContext httpContext) =>
{
throw new ApplicationException("TestException");
});
app.Run();
}
}
Expected Behavior
No response
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
9.0
Anything else?
No response
Metadata
Metadata
Assignees
Labels
area-middlewareIncludes: URL rewrite, redirect, response cache/compression, session, and other general middlewaresIncludes: URL rewrite, redirect, response cache/compression, session, and other general middlewares