Closed blowdart closed 6 years ago
Sounds like a DI config bug. Normally AddIdentity<CustomUser>
would add the UserManager<CustomUser>
@brockallen ,so ,i think it's maybe a bug
What's startup look like?
@HaoK, nothing special.
ApplicationUser : IdentityUser
ConfigureServices: services.AddIdentity<ApplicationUser, IdentityRole>() .AddEntityFrameworkStores<ApplicationDbContext>() .AddDefaultTokenProviders();
Configure: app.UseAuthentication();
you can rebuild it 3min.
@Caizhenyu Any chance you could create a repo that reproduces this issue? I'm not experiencing this myself, and my code looks very similar to what's shown here.
Closing due to lack of repro
From @Caizhenyu on July 7, 2018 11:58
I am using asp net core Identity Framework on core 2.1, and I implement my
ApplicationUser : IdentityUser
.Then there will throw Exception like the screenshot . But I found that, the same code is Ok on core 2.0, or I just user IdentityUser not my own ApplicationUser is also ok whileservices.AddIdentity<TUser, TRole>
.Is it's a core 2.1 bug?
Copied from original issue: aspnet/Security#1804