skip to Main Content

Asp.net – No service for type 'Microsoft.AspNetCore.Identity.UserManager`1[Microsoft.AspNetCore.Identity.IdentityUser]' has been registered Using Custom Class

I would like to register my service using the CustomUser class, which inherits from IdentityUser. However, when I do I get the following error in my browser: InvalidOperationException: No service for type 'Microsoft.AspNetCore.Identity.UserManager`1[Microsoft.AspNetCore.Identity.IdentityUser]' has been registered. My relevant code: builder.Services.AddDefaultIdentity<CustomUser>(options…

VIEW QUESTION

Asp.net – How the model class works in C#

public class Program { public static void Main(string[] args) { Person person = new Person(); person.name = "from main function"; Program pro = new Program(); Console.WriteLine(person.name); pro.change(person); Console.WriteLine(person.name); } public void change(Person per) { per.name = "From public void Change…

VIEW QUESTION
Back To Top
Search