-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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 RedirectManager
line - Keeps the correct
@inject IdentityRedirectManager RedirectManager
line 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.razor
file 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
RedirectManager
property, but onlyIdentityRedirectManager
is actually registered in the dependency injection container.Before:
After:
The fix removes the erroneous
@inject RedirectManager RedirectManager
line since:RedirectManager
type exists in the codebaseIdentityRedirectManager
is registered in DI (Program.cs)@inject IdentityRedirectManager RedirectManager
RedirectManager
continue 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.