You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Blazor] Error page support for Server Side Rendered Razor Component Applications (#50550)
## Description
Adds support for Error pages to Blazor Web application.
* Includes a small change to the ExceptionHandler middleware to support Blazor Web scenarios.
* Includes a change in Blazor Web to account for error handling scenarios and disable streaming rendering and interactivity.
* Includes changes to the Blazor Web template to add an Error page similar to the one in MVC and Razor pages templates.
Fixes#49853, #49854
## Customer Impact
* Customers won't be able to see errors in Blazor Web Applications without having to rely on MVC or Razor Pages for it,
which adds significant complexity to their setup.
## Regression?
- [ ] Yes
- [X] No
## Risk
- [ ] High
- [X] Medium
- [ ] Low
* If customers hit any issues, we will be able to tell them to simply remove the ErrorPage.razor page from their projects. Luckily, we will have a little bit of time to address any critical feedback in case such comes up. As of right now, this change has been validated and it works.
## Verification
- [X] Manual (required)
- [X] Automated
## Packaging changes reviewed?
- [ ] Yes
- [ ] No
- [X] N/A
[LoggerMessage(2,LogLevel.Debug,"The antiforgery middleware already failed to validate the current token.",EventName="MiddlewareAntiforgeryValidationFailed")]
251
+
[LoggerMessage(2,LogLevel.Debug,"The antiforgery middleware already failed to validate the current token.",EventName=nameof(MiddlewareAntiforgeryValidationFailed))]
[LoggerMessage(3,LogLevel.Debug,"The antiforgery middleware already succeeded to validate the current token.",EventName="MiddlewareAntiforgeryValidationSucceeded")]
254
+
[LoggerMessage(3,LogLevel.Debug,"The antiforgery middleware already succeeded to validate the current token.",EventName=nameof(MiddlewareAntiforgeryValidationSucceeded))]
[LoggerMessage(5,LogLevel.Information,"Antiforgery token validation failed for the current request.",EventName="EndpointAntiforgeryValidationFailed")]
260
+
[LoggerMessage(5,LogLevel.Information,"Antiforgery token validation failed for the current request.",EventName=nameof(EndpointAntiforgeryValidationFailed))]
[LoggerMessage(6,LogLevel.Debug,"Antiforgery token validation succeeded for the current request.",EventName="EndpointAntiforgeryValidationSucceeded")]
263
+
[LoggerMessage(6,LogLevel.Debug,"Antiforgery token validation succeeded for the current request.",EventName=nameof(EndpointAntiforgeryValidationSucceeded))]
[LoggerMessage(7,LogLevel.Debug,"Error handling in progress. Interactive components are not enabled.",EventName=nameof(InteractivityDisabledForErrorHandling))]
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
19
+
</p>
20
+
<p>
21
+
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
22
+
It can result in displaying sensitive information from exceptions to end users.
23
+
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
0 commit comments