I actually am setting up an application to have the username be an email address. In terms of creating and logging in users, it's easy. I templated the login control appropriately (see
http://forums.asp.net/993414/ShowPost.aspx) and as far as my Registration page goes, on the CreatingUser event of the CreateUserWizard control I just set the email address to equal the username so that both fields match:
public
void RegisterNewUser_CreatingUser(object sender, System.EventArgs e)
{
CreateUserWizard cuw = (CreateUserWizard)sender;
cuw.Email = cuw.UserName;
}As far as updating the UserName (in this case email address), I don't think the MembershipUser class allows it so I'm going to write my own method to accept a string for the old email address (username) and a string for the new one. This will first create a MembershipUser object with Membership.GetUser(oldEmailAddress) and change the Email property to the new value. Then I will execute a sql command to manually go into the aspnet_Users table and change the UserName and LoweredUserName values to the new value for the record matching the old UserName and the ApplicationId.
In theory I don't see any issues with this approach.