ASP.NET Membership Provider Gotcha!
Friday, January 12th, 2007It turns out that MembershipUser.UserName is a read only property, there is no Set { } method in the Membership Provider, only Get { }. If you try to use Membership.UpdateUser() to change an existing username, you will get the following error:
CS0200: Property or indexer ‘System.Web.Security.MembershipUser.UserName’ cannot be assigned to — it is read [...]