Xola Dlamini

Xola Dlamini

  • NA
  • 64
  • 3.2k

receiving UserId error when trying to log in as admin

Apr 21 2020 8:04 AM
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)