1
Answer

receiving UserId error when trying to log in as admin

Xola Dlamini

Xola Dlamini

4y
422
1
im currently learning how to create an mvc application and im working on authentication and authorization
 
 ive create an initializer class to create an admin user and role into identity database when they are created.
ive hard coded the admin, the role and the password.... when i run the application and try to login using the credentials i get the following error:
 
 UserId not found
this line of code is highlighted:
... = userManager.SetLockoutEnabled(user.ID,false);
Answers (1)