Last post Nov 18, 2019 03:02 AM by jiadongm
Nov 17, 2019 02:50 PM|thtang|LINK
I have tried to use the AddIdentity to replace the AddDefaultIdentity, but if I use the AddIdentity, I would get an error message "InvalidOperationException: Unable to resolve service for type 'Microsoft.AspNetCore.Identity.UI.Services.IEmailSender' while
attempting to activate ....LoginModel".
If I replace it with AddDefaultIdentity, no problem will be incurred. I would like to ask if there are much difference between the following two line of codes.
services.AddDefaultIdentity(options => options.SignIn.RequireConfirmedAccount = true).AddRoles().AddEntityFrameworkStores<theContext>();
Nov 18, 2019 03:02 AM|jiadongm|LINK
AddDefaultIdentity was introduced in ASP.NET Core 2.1. Calling AddDefaultIdentity
is similar to calling the following:
For more details you can refer to