Search code examples
asp.net-identity

UserManager RemoveFromRole bug


The function (RemoveFromRole in UserManager) to remove user from role is seriously buggy! If users has many roles the function seems to remove a random role but fortunately correct user.

Has anyone else experienced this?


Solution

  • There is a bug tracking this issue http://aspnetidentity.codeplex.com/workitem/2069 As a workaround you can remove all roles for the user and add the ones for now. It is not the best solution but it will work