InvalidOperationException when registering a new user with ASP .NET Core Identity and EntityFrameworkCore

后端 未结 2 1764
耶瑟儿~
耶瑟儿~ 2021-01-18 21:09

I\'m following the documentation for using Identity and am trying register a new user (executing the register action), but it fails with the following error:

2条回答
  •  伪装坚强ぢ
    2021-01-18 21:43

    I found the problem. My ApplicationContext was inheriting from DbContext. I changed it to IdentityDbContext and it works.

提交回复
热议问题