© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•12mo ago
xerces817

.NET Core 7 Global Exception Handling Middleware Requires Refresh!

Thank you in advance to anyone who can assist-

I have a .NET Core 7 Blazor app and I have instituted GEH via a middleware class that catches the next request via RequestDelegate and inserts into a try/catch block (see attached image);

The problem is that, while it works, the page has to be refreshed in order for the custom message/problem to be shown.

Is this an issue with the RequestDelegate? That it only executes after the current response?
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

EF Core Global Query Filter Exception
C#CC# / help
4y ago
.net 7 global json error
C#CC# / help
4y ago
❔ Serilog duplicate log with global exception handling
C#CC# / help
3y ago
✅ Exception handling..
C#CC# / help
17mo ago