-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Remove duplicate RedirectManager injection in Blazor Web App ChangePassword template #63447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: ilonatommy <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
|
/backport to release/10.0 |
|
Started backporting to release/10.0: https://github.com/dotnet/aspnetcore/actions/runs/17271483739 |
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.