I had a similar issue. This might be more helpful for people using .Net Core 3.0. After digging around I found out that once you create an “Identity” area using scaffolding. A file called “IdentityHostingStartup.cs” is created inside the Identity folder.
Inside the class, another instance of “AddDefaultIdentity” is created along with a few other services.
If you remove the “addDefaultIdentity” from your “Startup.cs” your app should start. Also, If you are getting a null connection string error. Update the connection string inside of the IdentityHostintgStartup.cs
Note: Deleting either of the addDefaultIdentities will work. You just can’t have it in both locations.