The answer is in your body of the question.
table 'xxx.dbo.AspNetUsers'; column does not allow nulls.
It seems you are trying to insert a NULL value from an instance of the RegisterBindingModel model , where the structure of your table on the database server does not allow to accept a NULL value.
Try debugging and checking if your model is instantiated correctly when the request arrives.
Also I see that you are using:
IdentityResult result = await UserManager.CreateAsync(user, model.Password);
Why is the user not a member of your model, for example, the Password property? Perhaps try using:
IdentityResult result = await UserManager.CreateAsync(model.User, model.Password);
In any case ... I no longer have information and can not imagine what is inside the model instance, how do you bind data to it from the request. You should look in the debugger and debug very well to restore the project or provide additional information.
But one thing is clear, like a crystal, you are trying to insert a NULL value in a column that does not accept NULL , so you should check how your model binds. Perhaps your client application is sending some arguments incorrectly, maybe you are not binding the model correctly, maybe something else ... You need to get more information from you to help you, otherwise you must carefully debug it.
user2402179
source share