Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

DI problem with my own LocalRegistrationController #436

Closed
IWriteApps opened this issue Oct 11, 2014 · 3 comments
Closed

DI problem with my own LocalRegistrationController #436

IWriteApps opened this issue Oct 11, 2014 · 3 comments
Assignees
Labels

Comments

@IWriteApps
Copy link

I'm very new to IdentityServer and don't quite follow everything yet, so sorry if this is a silly question...

Following the CustomUserService example I'm trying to create my own LocalRegistrationController which would use my own UserManager to create the new user. I've added the register LoginPageLink, but when I click on it I get an exception saying there's no parameterless constructor.

I've event registered my controller with the IdentityServerServiceFactory, but to no avail. How can I get this UserManager in my controller?

@brockallen brockallen self-assigned this Oct 11, 2014
@brockallen
Copy link
Member

@IWriteApps
Copy link
Author

I've got the registering working fine, because the rest of the system works. I've even tested the wsfed successfully. But I must be missing something else because I wrote my custom Controller to take in the UserManager and that did not work. Then just to test the injection in general I tried having a constructor with IUserService but that didn't work either, still got the parameterless constructor exception.

@brockallen
Copy link
Member

Ah, your custom controller -- well, that's being created by MVC and not by IdentityServer. We don't really support you using our interfaces being injected into an external framework.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants