Board index » Web Programming » Membership.CreateUser: The E-mail supplied is invalid.

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

Web Programming283
Hi Expert,



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

"r09gtrez30@")



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

unique?



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

beautiful solution?



thanks a ton in advance.



Alan


-
 

Re:Membership.CreateUser: The E-mail supplied is invalid.



There may be a work around, but I get around these type isses like this.



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

"@doesnotexist.com";



something like that.









"Alan" <alanwo@gmail.com>wrote in message

Quote
Hi Expert,



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

"r09gtrez30@")



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

unique?



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

beautiful solution?



thanks a ton in advance.



Alan







-

Re:Membership.CreateUser: The E-mail supplied is invalid.

Sloan,



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

more choices.



Alan



On Oct 3, 2:13 am, "sloan" <sl...@ipass.net>wrote:

Quote
There may be a work around, but I get around these type isses like this.



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

"@doesnotexist.com";



something like that.



"Alan" <ala...@gmail.com>wrote in message



news:1191348023.708034.288740@r29g2000hsg.googlegroups.com...







>Hi Expert,



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

>"r09gtrez30@")



>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

>unique?



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

>beautiful solution?



>thanks a ton in advance.



>Alan- Hide quoted text -



- Show quoted text -





-