I want to change the UserName but its read only.
var memberShipProvider = Membership.Providers["SqlServerMembershipProvider"];
var user = memberShipProvider.GetUser(providerUserKey, false); //Returns my user
user.UserName = "email@example.com"; //PROBLEM read only
user.Email= "firstname.lastname@example.org"; //WORKS but its not the username =)
how would you do it? The things i have tested
It's not epi-related, but asp.net related and you can do just that (changing in database) https://stackoverflow.com/questions/1001491/is-it-possible-to-change-the-username-with-the-membership-api
We usually recommend against direct database access but when you really need it, and if you are very very careful, we can't stop you