✅ Identity Services Registration not working
I declare a class to handle 'email':
Then in Program.cs I register the service:
Finally i try and grab the service and it throws an error
Everywhere i look it people use this same method to register the emailsender, so i am not sure what i am doing wrong.
7 Replies
DI is trying to resolve a generic
IEmailSender<IdentityUser>
but you only show that you're registering a non-generic IEmailSender
i get the same issues if i remove <TUser> from MyEmailService
because that's not the problem
you need to register the service as an
IEmailSender<IdentityUser>
not IEmailSender
huh. ok.
not sure what that wouldent be generic...
because it's not, you used a different interface
¯\_(ツ)_/¯
ok
thanks
hey its working!
thanks a ton!
:bless: