You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And the IAuthProvider implementation (BlazrAuthProvider) has a constructor with signature:
public BlazrAuthProvider(BlazrDBContext dbcontext, IHasher hasher) {....}
When I run my application and navigate to a route under the ApiController above, I get the whole "No default constructor" error. I have removed the injected parameters from the constructors as to narrow down which one was causing the problem - and it was the IHasher under the BlazrAuthprovider. If I remove that from the constructor, it loads just fine.
I implemented a NinjectDependencyResolver (IDependencyResolver) as others have suggested but still can't get this to work. Am I missing something?
Also worth noting: the Controller is under it's own Web API Project and the other classes/interfaces are under a Class Library Project in the same solution.
The text was updated successfully, but these errors were encountered:
I have an ApiController with the following constructor signature:
My bindings:
And the IAuthProvider implementation (BlazrAuthProvider) has a constructor with signature:
When I run my application and navigate to a route under the ApiController above, I get the whole "No default constructor" error. I have removed the injected parameters from the constructors as to narrow down which one was causing the problem - and it was the IHasher under the BlazrAuthprovider. If I remove that from the constructor, it loads just fine.
I implemented a NinjectDependencyResolver (IDependencyResolver) as others have suggested but still can't get this to work. Am I missing something?
Also worth noting: the Controller is under it's own Web API Project and the other classes/interfaces are under a Class Library Project in the same solution.
The text was updated successfully, but these errors were encountered: