Showing posts with label
The type IUserStore`1 does not have an accessible constructor.
Show all posts
Showing posts with label
The type IUserStore`1 does not have an accessible constructor.
Show all posts
System.InvalidOperationException: The type IUserStore`1 does not have an accessible constructor.
The AccountController class has two constructors, a default one with no parameter and another expecting a UserManager<T> object.when the class gets instantiated, Unity takes by default the one with the most parameters.
Hence,In the location where the types are registered in the Unity container (var container = new UnityContainer()) for global.asax,cs ,the following line has to be added :-
container.RegisterType<AccountController>(new InjectionConstructor());