2

There is an issue reported here ASP.NET Membership Issues With Registration which summarizes a situation I am experiencing. I'm not sure I understand the claimed solution.

Simply put, after invoking this line:

MembershipUser user = Membership.CreateUser(username, password, email, question, answer, true, out status);

I run into a situation where

status != MembershipCreateStatus.Success || user == null 

yet entries are added to the tables: aspnet Users and aspnet Membership.

Here is what I have in my web.config

 passwordStrengthRegularExpression="" minRequiredPasswordLength="4" minRequiredNonalphanumericCharacters="0"

Can someone enlighten me on how to reproduce this issue so that I can fix the related issue in my code?

Community
  • 1
  • 1
Jason Kealey
  • 7,988
  • 11
  • 42
  • 55

1 Answers1

1

If your MembershipCreateStatus.Success is != to success then have you checked the other enumeration values to see if one of them give you more of a clue:

DuplicateUserName, DuplicateEmail, InvalidPassword, InvalidEmail, InvalidAnswer, InvalidQuestion, InvalidUserName, ProviderError, UserRejected

Kevin LaBranche
  • 20,908
  • 5
  • 52
  • 76