.NET Framework - Membership.CreateUser: The E-mail supplied is invalid.

Asked By Alan on 02-Oct-07 02:00 PM
Hi Expert,

Dim u As MembershipUser = Membership.CreateUser("jfewfewa801",

Above statement return "The E-mail supplied is invalid." until I set
requiresUniqueEmail="false" in web.config. Is there a way to create
user with empty email address while required non-empty email to be

I can insert dummy unique to work around this but it's so ugly, any
beautiful solution?

thanks a ton in advance.


sloan replied on 02-Oct-07 02:13 PM
There may be a work around, but I get around these type isses like this.

string fakeEmail = System.Guid.NewGuid().ToString("N") +

something like that.
Alan replied on 03-Oct-07 09:50 AM

This is the same workaround I thought of. It seems that we have no
more choices.