Remove duplicate RedirectManager injection in Blazor Web App ChangePassword template#63447
Merged
ilonatommy merged 2 commits intomainfrom Aug 27, 2025
Merged
Remove duplicate RedirectManager injection in Blazor Web App ChangePassword template#63447ilonatommy merged 2 commits intomainfrom
ilonatommy merged 2 commits intomainfrom
Conversation
Co-authored-by: ilonatommy <32700855+ilonatommy@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Blazor Web App template - bug in ChangePassword.razor
Remove duplicate RedirectManager injection in Blazor Web App ChangePassword template
Aug 27, 2025
ilonatommy
approved these changes
Aug 27, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR removes a duplicate dependency injection line in the Blazor Web App template's ChangePassword.razor file. The file had two conflicting @inject directives trying to inject into the same RedirectManager property, causing a template inconsistency.
- Removes the incorrect
@inject RedirectManager RedirectManagerline - Keeps the correct
@inject IdentityRedirectManager RedirectManagerline that matches the registered DI service - Aligns the template with other files that consistently use
IdentityRedirectManager
Member
|
/backport to release/10.0 |
Contributor
|
Started backporting to release/10.0: https://github.com/dotnet/aspnetcore/actions/runs/17271483739 |
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Blazor Web App template's
ChangePassword.razorfile contained a duplicate dependency injection line that was accidentally added. The file had both:This created a conflict where both lines were trying to inject into the same
RedirectManagerproperty, but onlyIdentityRedirectManageris actually registered in the dependency injection container.Before:
After:
The fix removes the erroneous
@inject RedirectManager RedirectManagerline since:RedirectManagertype exists in the codebaseIdentityRedirectManageris registered in DI (Program.cs)@inject IdentityRedirectManager RedirectManagerRedirectManagercontinue to work unchangedThis is a minimal fix that resolves the template inconsistency while maintaining full functionality.
Fixes #63445.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.