shepherdweb.com

Archive for January 12th, 2007

ASP.NET Membership Provider Gotcha!

Friday, January 12th, 2007

It 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 [...]

Bad Behavior has blocked 692 access attempts in the last 7 days.