2
이 같은 일부 종속성을 등록하는 데 문제가 있습니다.Structuremap x Asp.net Identity
No default Instance is registered and cannot be automatically determined for type 'IUserStore<ApplicationIdentityUser, Int32>'
There is no configuration specified for IUserStore<ApplicationIdentityUser, Int32>
1.) new UserManager`2(*Default of IUserStore<ApplicationIdentityUser, Int32>*)
2.) UserManager<ApplicationIdentityUser, Int32>
3.) Instance of UserManager<ApplicationIdentityUser, Int32>
4.) new ApplicationUserManager(*Default of UserManager<ApplicationIdentityUser, Int32>*, *Default of IAuthenticationManager*)
5.) MyClinic.Infra.Data.Identity.ApplicationUserManager
6.) Instance of MyClinic.Core.Identity.IApplicationUserManager (MyClinic.Infra.Data.Identity.ApplicationUserManager)
7.) new AccountController(*Default of IApplicationUserManager*)
8.) MyClinic.Web.Controllers.AccountController
9.) Instance of MyClinic.Web.Controllers.AccountController
10.) Container.GetInstance(MyClinic.Web.Controllers.AccountController)
누군가 나를 도울 수 있습니까?
내 계정 컨트롤러는 다음과 같습니다
public class AccountController : Controller
{
private IApplicationUserManager _userManager;
public AccountController(IApplicationUserManager userManager)
{
_userManager = userManager;
}
}
내 응용 프로그램의 사용자 관리자 :
public class ApplicationUserManager : IApplicationUserManager
{
private readonly UserManager<ApplicationIdentityUser, int> _userManager;
private readonly IAuthenticationManager _authenticationManager;
private bool _disposed;
public ApplicationUserManager(UserManager<ApplicationIdentityUser, int> userManager, IAuthenticationManager authenticationManager)
{
_userManager = userManager;
_authenticationManager = authenticationManager;
}
}
이 질문에 다른 변화가있다 HttpContext.Current에 표시 얻을
패키지를 설치해야합니다. 도움이 될 것입니다. http://stackoverflow.com/a/27244289/351204 –