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

by neo_savvy 4/5/2008 5:55:00 PM

Are you getting this exception with this code?

MembershipUser user = Membership.CreateUser([username], [password]);

That exception message is a very poor description of the actual problem. You definitely have set requiresUniqueEmail = "true" in your web.config. The issue at hand is the method you have chosen. If you have requiresUniqueEmail set to true, then you must supply a unique email when you create a user. So you should use the appropriate overloaded method:

MembershipUser user = Membership.CreateUser([username], [password], [email]);

That should solve the problem, hopefully Laughing.

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

ASP.net

Related posts

Comments

Add comment


 

  Country flag





Live preview

3/9/2010 11:01:10 PM

Powered by BlogEngine.NET 1.2.0.0
Theme by Mads Kristensen

About the author

Chyke Ucheya Chyke Ucheya
I'm a Software Engineer at a leading Technology Consulting firm in Atlanta, GA.

E-mail me Send mail

Calendar

<<  March 2010  >>
MoTuWeThFrSaSu
22232425262728
1234567
891011121314
15161718192021
22232425262728
2930311234

View posts in large calendar

Recent comments

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010

Sign in