Name cannot be null or empty. asp.net identity mvc 5 + EntityFreamwork

前端 未结 2 1239
悲&欢浪女
悲&欢浪女 2021-02-15 09:34

Has anyone had a problem with this. He throws me the error: Name can not be null or empty. But in the table do not have the attribute called \"Name\". I want to customize Asp.Ne

相关标签:
2条回答
  • 2021-02-15 09:58

    Solved (for me at least) By REMOVING the UserName property from the customized identity (its in the GitHub ASPNetIdentitySample project which is where I guess people are getting it from). Its hiding the UserName property in IdentityUser

    0 讨论(0)
  • 2021-02-15 10:03

    Make sure you have specified a username. I got the same error and after setting the UserName property, the error went away.

    0 讨论(0)
提交回复
热议问题