Skip to content

AddRoles to a Blazor 8 app throws System.AggregateException #51638

Closed
@DWhiteR1

Description

@DWhiteR1

Hi.
In trying to add roles to my Blazor app.

builder.Services.AddIdentityCore<ApplicationUser>(options => options.SignIn.RequireConfirmedAccount = true)
    .AddEntityFrameworkStores<ApplicationDbContext>()
    .AddSignInManager()
    .AddRoles<IdentityRole>()
    .AddDefaultTokenProviders();`

I added .AddRoles<IdentityRole>() to the "Out of the box" template "dotnet new blazor -au Individual"

Exception thrown: 'System.AggregateException' in Microsoft.Extensions.DependencyInjection.dll

Am I missing something...

Regards,
Dean

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions