How to inject UserManager & SignInManager
<p>I am trying to figure out how to inject UserManager and SignInManager.  I have installed Ninject in my application and I am using it in the following manner:</p>

<p>Please consider this to be a brand new project.  Inside Startup.cs I have the following:</p>

<pre><code>public partial class Startup
{
    public void Configuration(IAppBuilder app)
    {
        ConfigureAuth(app);

        app.UseNinjectMiddleware(CreateKernel);
    }

    private static IKernel CreateKernel()
    {
        var kernel = new StandardKernel();
        kernel.Load(Assembly.GetExecutingAssembly());


        return kernel;
    }
}
</code></pre>

<p>now if I were to create some Dummy class and try to inject it based on its interface that works.  I have tested it.  What I am trying to figure out is how would I now strip out the following out of Startup.Auth.cs and inject it.  Having no interfaces I can rely on, I am not sure how this is done:</p>

<pre><code>app.CreatePerOwinContext(ApplicationDbContext.Create);
app.CreatePerOwinContext&lt;ApplicationUserManager&gt;(ApplicationUserManager.Create);
app.CreatePerOwinContext&lt;ApplicationSignInManager&gt;(ApplicationSignInManager.Create);
</code></pre>

<p>Just to clarify one more time, my question is: How do I instantiate ApplicationUserManager and ApplicationSignInManager and inject it in my controller parameters.  Here is the controller that I am trying to inject this into:</p>

<pre><code>public AccountController(ApplicationUserManager userManager, ApplicationSignInManager signInManager)
{
    UserManager = userManager;
    SignInManager = signInManager;
}
</code></pre>

<p>EDIT:</p>

<p>Here is what I tried:</p>

<pre><code>private static IKernel CreateKernel()
{
    var kernel = new StandardKernel();
    kernel.Load(Assembly.GetExecutingAssembly());

    kernel.Bind&lt;IUserStore&lt;ApplicationUser&gt;&gt;().To&lt;UserStore&lt;ApplicationUser&gt;&gt;();
    kernel.Bind&lt;UserManager&lt;ApplicationUser&gt;&gt;().ToSelf();

    return kernel;
}
</code></pre>

<p>But with this I get null reference error</p>