.net core Error
InvalidOperationException: Unable to resolve service for type 'Microsoft.AspNetCore.Identity.RoleManager
1[Microsoft.AspNetCore.Identity.IdentityRole
1[System.Int32]]' while attempting to activate 'Library.Controllers.AccountController'.
Microsoft.Extensions.DependencyInjection.ActivatorUtilities.ThrowHelperUnableToResolveService(Type type, Type requiredBy) what is the solution of this error?5 Replies
It's saying there's no service registered for that type. You need to register that service.
RoleManager
should be added by one of the high level initialization methods in Identity
Thank you for your answer but how can I do this?
do you know what DI is?
service provider?
I dont know? If I can write DI may be I get solution.
well learn DI then
it's a fundamental thing