Witam chciałem używać Dependency Injection w swoim projekcie więc zainstalowałem Unity.Mvc3 następnie uzupełniłem Bootstrapper.cs w podany sposób:

public static class Bootstrapper
    {
        public static void Initialise()
        {
            var container = BuildUnityContainer();
     
            container.RegisterType<Controller, ManageController>();         

            DependencyResolver.SetResolver(new UnityDependencyResolver(container));
        }

        private static IUnityContainer BuildUnityContainer()
        {
            var container = new UnityContainer();

            // register all your components with the container here
            // it is NOT necessary to register your controllers
            
            // e.g. container.RegisterType<ITestService, TestService>();            

            return container;
        }
    } 

i pojawia się błąd:

Błąd serwera w aplikacji '/'.

The current type, Microsoft.AspNet.Identity.IUserStore`1[CookProject.Models.ApplicationUser], is an interface and cannot be constructed. Are you missing a type mapping?

Opis: Podczas wykonywania bieżącego żądania sieci Web wystąpił nieobsługiwany wyjątek. Aby uzyskać dodatkowe informacje o błędzie i miejscu jego występowania w kodzie, przejrzyj ślad stosu.

Szczegóły wyjątku: System.InvalidOperationException: The current type, Microsoft.AspNet.Identity.IUserStore`1[CookProject.Models.ApplicationUser], is an interface and cannot be constructed. Are you missing a type mapping?

Błąd źródła:

Podczas wykonywania bieżącego żądania sieci Web został wygenerowany nieobsługiwany wyjątek. Informacje dotyczące pochodzenia i lokalizacji wyjątku można zidentyfikować przy użyciu poniższego śladu stosu wyjątku.

Ślad stosu:

[InvalidOperationException: The current type, Microsoft.AspNet.Identity.IUserStore1[CookProject.Models.ApplicationUser], is an interface and cannot be constructed. Are you missing a type mapping?] Microsoft.Practices.ObjectBuilder2.DynamicMethodConstructorStrategy.ThrowForAttemptingToConstructInterface(IBuilderContext context) +286 BuildUp_Microsoft.AspNet.Identity.IUserStore1CookProject.Models.ApplicationUser, CookProject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null(IBuilderContext ) +74
Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(IBuilderContext context) +42
Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context) +319
Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context) +260
Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp(NamedTypeBuildKey newBuildKey) +250
Microsoft.Practices.Unity.ObjectBuilder.NamedTypeDependencyResolverPolicy.Resolve(IBuilderContext context) +101
BuildUp_CookProject.App_Start.ApplicationUserManager(IBuilderContext ) +202
Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(IBuilderContext context) +42
Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context) +319
Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context) +260
Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp(NamedTypeBuildKey newBuildKey) +250
Microsoft.Practices.Unity.ObjectBuilder.NamedTypeDependencyResolverPolicy.Resolve(IBuilderContext context) +101
BuildUp_CookProject.Controllers.ManageController(IBuilderContext ) +204
Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(IBuilderContext context) +42
Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context) +319
Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context) +260
Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable`1 resolverOverrides) +373

[ResolutionFailedException: Resolution of the dependency failed, type = "CookProject.Controllers.ManageController", name = "(none)".
Exception occurred while: while resolving.
Exception is: InvalidOperationException - The current type, Microsoft.AspNet.Identity.IUserStore`1[CookProject.Models.ApplicationUser], is an interface and cannot be constructed. Are you missing a type mapping?

At the time of the exception, the container was:

Resolving CookProject.Controllers.ManageController,(none)
Resolving parameter "userManager" of constructor CookProject.Controllers.ManageController(CookProject.App_Start.ApplicationUserManager userManager)
Resolving CookProject.App_Start.ApplicationUserManager,(none)
Resolving parameter "store" of constructor CookProject.App_Start.ApplicationUserManager(Microsoft.AspNet.Identity.IUserStore1[[CookProject.Models.ApplicationUser, CookProject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] store) Resolving Microsoft.AspNet.Identity.IUserStore1[CookProject.Models.ApplicationUser],(none)
]
Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable1 resolverOverrides) +436 Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, String name, IEnumerable1 resolverOverrides) +50
Microsoft.Practices.Unity.UnityContainer.Resolve(Type t, String name, ResolverOverride[] resolverOverrides) +48
Microsoft.Practices.Unity.UnityContainerExtensions.Resolve(IUnityContainer container, Type t, ResolverOverride[] overrides) +61
Unity.Mvc3.UnityDependencyResolver.GetService(Type serviceType) +139
MvcSiteMapProvider.DI.DependencyResolverDecorator.GetService(Type serviceType) +195
System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +87

[InvalidOperationException: An error occurred when trying to create a controller of type 'CookProject.Controllers.ManageController'. Make sure that the controller has a parameterless public constructor.]
System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +247
System.Web.Mvc.DefaultControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType) +437
System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName) +257
System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory) +326
System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +157
System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state) +88
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +50
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +103
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

czy ktoś wie jak można to naprawić?