Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

UseExceptionHandler not work in netcore3 preview7

$
0
0

create a new project ,nothing changed.

And I manual throw an exception in an action.

app.UseExceptionHandler("/Home/Error");

it is worked in netcore2.2,but failed in netcore3 preview7.

when I use this code, it is worked.

app.UseExceptionHandler(builder =>
            {
                builder.Run(async context =>
                {
                    context.Response.Redirect("/Home/Error");
                });
            });

I can't understand...


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>