title: 'IdentityContext' could not be found (are you missing a using directive or an assembly reference)
body: <p>I am migrate the project <a href="https://github.com/attilah/AngularJSAuthentication" rel="nofollow">https://github.com/attilah/AngularJSAuthentication</a> to  using mongodb driver verson 2 , and I am in the final step here:</p>
  
  <pre><code>namespace AngularJSAuthentication.API
  {
      using AspNet.Identity.MongoDB;
      using Entities;
      using MongoDB.Driver;
  
      public class ApplicationIdentityContext : IdentityContext
      {
          public ApplicationIdentityContext(IMongoContext mongoContext)
              : this(mongoContext.Users, mongoContext.Roles)
          {
          }
  
          public ApplicationIdentityContext(IMongoCollection&lt;User&gt; users, IMongoCollection&lt;Role&gt; roles)
              : base(users, roles)
  
          {
          }
      }
  }
  </code></pre>
  
  <p>Then I get this error </p>
  
  <p><code>Severity   Code    Description Project File    Line    Suppression State
  Error   CS0246  The type or namespace name 'IdentityContext' could not be found (are you missing a using directive or an assembly reference?)   AngularJSAuthentication.API D:\Projects\AngularJSAuthentication-master\AngularJSAuthentication.API\ApplicationIdentityContext.cs</code></p>
  
  <p>Here is my current source code </p>
  
  <p><a href="https://github.com/skanel/Angular2-WebApi2-Mongodb2-Authentication" rel="nofollow">https://github.com/skanel/Angular2-WebApi2-Mongodb2-Authentication</a></p>
  
  <p>UPDATED</p>
  
  <p>@Swagata Prateek, thank for your code,however when I run the It stop working in direct me to this block of code in startup.cs</p>
  
  <pre><code>private void ConfigureOAuth(IAppBuilder app, IContainer container)
          {
              var OAuthServerOptions = new OAuthAuthorizationServerOptions
              {
                  AllowInsecureHttp = true,
                  TokenEndpointPath = new PathString("/token"),
                  AccessTokenExpireTimeSpan = TimeSpan.FromMinutes(30),
                  Provider = container.Resolve&lt;IOAuthAuthorizationServerProvider&gt;(),
                  RefreshTokenProvider = container.Resolve&lt;IAuthenticationTokenProvider&gt;()
              };
  </code></pre>
  
  <p><strong>Error</strong></p>
  
  <blockquote>
    <p>An exception of type 'Autofac.Core.DependencyResolutionException'
    occurred in Autofac.dll but was not handled in user code</p>
    
    <p>Additional information: An error occurred during the activation of a
    particular registration. See the inner exception for details.
    Registration: Activator = SimpleAuthorizationServerProvider
    (ReflectionActivator), Services =
    [Microsoft.Owin.Security.OAuth.IOAuthAuthorizationServerProvider],
    Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared,
    Ownership = OwnedByLifetimeScope</p>
  </blockquote>