Asp Mvc 5 user registration fails
ASP.NET
1
Posts
1
Posters
0
Views
1
Watching
-
Hello , I am trying to make a custom login page . On adding the password to AspNetUsers I get the following error : Cannot insert explicit value for identity column in table 'AspNetUsers' when IDENTITY_INSERT is set to OFF. Source Error: Line 86: Line 87: var user = new ApplicationUser() { UserName = model.UserName }; Line 88: var result = await UserManager.CreateAsync(user, model.Password); Line 89: ApplicationUser appusr = new ApplicationUser(); Line 90: IdentityUserRole idnt = new IdentityUserRole(); Is there any way to solve this without changing the identity column . The default field is Id nvarchar(128) .