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 4.5 by 4 people

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

Tags: ,

ASP.net

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

<<  September 2010  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

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