Aspnetcore.docs: Update Scaffold Identity to 3.1

Created on 1 Jan 2019  Â·  6Comments  Â·  Source: dotnet/AspNetCore.Docs

18.6 K PV/month

Hey Rick,
Lets try this again.
Please follow the instructions here:
To up-date the documentation here:
The docs should all be referencing ASP.NET Core version 2.2 now.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

P1 Source - Docs.ms doc-bug

Most helpful comment

image

All 6 comments

@hongzewangpa wrote:

I found if I move the services.Addxxx out of IdentityHostingStartupinto startup.cs, it is working.

//code piece moved:
                services.AddDbContext<ApplicationDbContext>(options =>
                options.UseSqlServer(
                    context.Configuration.GetConnectionString("DefaultConnection")));

                services.AddDefaultIdentity<IdentityUser>()
                    .AddEntityFrameworkStores<ApplicationDbContext>();

See #12857

image

options.AllowAreas = true;
this setting doesn't work in ASP.NET Core 3.0
Any work around for this ?

AllowAreas is a compatibility switch. With 3.0 being a breaking change, Areas are "allowed" out of the box, so options.AllowAreas = true; can be dropped.

https://github.com/aspnet/AspNetCore.Docs/issues/14357#issuecomment-532385914

Documentation is not updated for .Net Core 3.0. I tried the section "Create full identity UI source". I had to add below line for services.AddIdentityServer() to work (ApplicationUser is my IdentityUser):
services.AddScoped,UserClaimsPrincipalFactory();

Was this page helpful?
0 / 5 - 0 ratings