How to fix “Exception of type 'Unity.Exceptions.InvalidRegistrationException' was thrown” - cSharp Coder

Latest

cSharp Coder

Sharp Future

Thursday, October 22, 2020

How to fix “Exception of type 'Unity.Exceptions.InvalidRegistrationException' was thrown”

 I have resolved my problem, I have injected the dependencies with this method, but I don't understand very well why it's work...

Now, Identity works fine with my Unity DI

container.RegisterType<AccountController>(new InjectionConstructor());
container.RegisterType<RolesAdminController>(new InjectionConstructor());
container.RegisterType<ManageController>(new InjectionConstructor());
container.RegisterType<UsersAdminController>(new InjectionConstructor());

No comments:

Post a Comment