Reputation: 2011
I have an ASP.NET MVC 5 project with ASP.NET Identity. I would use Unity DI framework, but it seems if Unity is the DI tool, than ASP.NET Identity could be broken.
After installing Unity.MVC4, AccountController's ctor break down. After uninstalling, it is working again.
So, how could I use Unity with ASP.NET Identity. I think I should register some Type into container, but what are these types?
I tried this, but it is not working:
container.RegisterType, UserStore>();
Please advice,
Upvotes: 1
Views: 1246
Reputation: 2011
I found the solution here:
Visual Studio 2013 MVC template raises errors when used with Unity
The reason of this error is: Unity wants to use AccountController ctor with most argument, but in this case it must use the simplest ctor.
Upvotes: 0