Closed
Description
From @mikeharder on Thursday, May 5, 2016 4:41:03 PM
The following user code shows the exception page as expected:
app.UseDeveloperExceptionPage();
app.Run(async (context) =>
{
throw new Exception();
await context.Response.WriteAsync("hello");
});
However, the following user code just gets an incomplete response and no exception page:
app.UseDeveloperExceptionPage();
app.Run(async (context) =>
{
await context.Response.WriteAsync("hello");
throw new Exception();
});
In ASP.NET 4.6, I believe we buffer responses (at least by default), so developers get a nice error page almost anywhere an exception is thrown. We may want to do the same in ASP.NET Core, perhaps only when running in debug mode or only when UseDeveloperExceptionPage()
has been called.
Copied from original issue: aspnet/Diagnostics#281