title: Registering UserStore with SimpleInjector for AccountController / ApplicationUserManager
body: <p>I have the following generic webApi2 AccountController:-</p>
  
  <pre><code>    private const string LocalLoginProvider = "Local";
      private ApplicationUserManager _userManager;
  
      public AccountController(ApplicationUserManager userManager,
          ISecureDataFormat&lt;AuthenticationTicket&gt; accessTokenFormat)
      {
          UserManager = userManager;
          AccessTokenFormat = accessTokenFormat;
      }
  
      public ApplicationUserManager UserManager
      {
          get
          {
              return _userManager ?? Request.GetOwinContext().GetUserManager&lt;ApplicationUserManager&gt;();
          }
          private set
          {
              _userManager = value;
          }
      }
  </code></pre>
  
  <p>And the following in the IdetityConfig.cs :-</p>
  
  <pre><code>    public ApplicationUserManager(IUserStore&lt;ApplicationUser&gt; store)
          : base(store)
      {
      }
  </code></pre>
  
  <p>and I am using the following SimpleInjector to do my DI :-</p>
  
  <pre><code>public static class SimpleInjectorWebApiInitializer
  {
      /// &lt;summary&gt;Initialize the container and register it as Web API Dependency Resolver.&lt;/summary&gt;
      public static void Initialize()
      {
          var container = new Container();
          container.Options.DefaultScopedLifestyle = new WebApiRequestLifestyle();
  
          InitializeContainer(container);
  
          container.RegisterWebApiControllers(GlobalConfiguration.Configuration);
  
          container.Verify();
  
          GlobalConfiguration.Configuration.DependencyResolver =
              new SimpleInjectorWebApiDependencyResolver(container);
  
      }
  
      private static void InitializeContainer(Container container)
      {
          // For instance:
          container.Register&lt;IFileHelpers, FileHelpers&gt;();
  
          //container.Register&lt;UserManager&lt;ApplicationUser, string&gt;&gt;(
          //    () =&gt; new UserManager&lt;ApplicationUser, string&gt;(new UserStore&lt;ApplicationUser&gt;()),
          //    Lifestyle.Scoped);
          //container.Register&lt;IUserStore&lt;ApplicationUser, string&gt;&gt;(() =&gt; (new UserStore&lt;ApplicationUser&gt;()),
          //    Lifestyle.Scoped);
  
          container.Register&lt;IUserStore&lt;ApplicationUser&gt;, UserStore&lt;ApplicationUser&gt;&gt;();
      }
  }
  </code></pre>
  
  <p>However I am getting the following error :-
  "For the container to be able to create <code>UserStore&lt;ApplicationUser&gt;</code> it should have only one public constructor: it has 2. See <a href="https://simpleinjector.org/one-constructor" rel="nofollow">https://simpleinjector.org/one-constructor</a> for more information."</p>
  
  <p>Can anyone help me and tell me why I am getting the following error for the UserStore?  Is there any other way I have to define that?</p>
  
  <p>Thanks for your help and time!</p>