Could not find type or namespace name 'ApplicationUserManager'

I followed the following article as far as possible by Rick Anderson: MVC 5 Application with Facebook, Twitter, LinkedIn and Google OAuth2 Signing

I am trying to authenticate Google Authentication and work with my local machine ...

Startup.Auth.cs looks like this (exactly the same as in the article this time):

// Configure the db context and user manager to use a single instance per request
app.CreatePerOwinContext(ApplicationDbContext.Create);
app.CreatePerOwinContext<ApplicationUserManager>(ApplicationUserManager.Create);


// Enable the application to use a cookie to store information for the signed in user
// and to use a cookie to temporarily store information about a user logging in with a third party login provider
// Configure the sign in cookie
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
    AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
    LoginPath = new PathString("/Account/Login"),
    Provider = new CookieAuthenticationProvider
    {
        OnValidateIdentity = SecurityStampValidator.OnValidateIdentity<ApplicationUserManager, ApplicationUser>(
            validateInterval: TimeSpan.FromMinutes(30),
            regenerateIdentity: (manager, user) => user.GenerateUserIdentityAsync(manager))
    }
});

app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);

      

Mistake. The type or namespace name 'ApplicationUserManager' could not be found.

Do we need to create ApplicationUserManager? (as described here: http://blogs.msdn.com/b/webdev/archive/2014/02/18/10499038.aspx

Or better:

Where are we ApplicationUserManager? Is there a nuget package that should have created it?

I've read in various places that ApplicationUserManager was used in IdentityConfig.cs, but IdentityConfig.cs doesn't exist anymore if you stick with current nuget packages.

+3


source to share


1 answer


I had the same problem. I am following the tutorial, but I started an MVC 5 project with VS 2012 with a blank project. I think the creator of the tutorial used a different template that already contained what I found on NuGet.

This is the following:



enter image description here

+5


source







All Articles