Change username in MVC 5
问题 I am using ASP.NET MVC5 and Identity 2.0 (beta). It is possible for users to change the username? I am trying using UserManager.UpdateAsync method throws an exception. Regrads, Fran. 回答1: Yes it is possible using the UpdateAsync method but you need to ensure that you update both the email and username fields. var user = userManager.FindById(userId); user.Email = email; user.UserName = email; var updateResult = await userManager.UpdateAsync(user); This method works successfully for me 回答2: