Alexandre
Alexandre

Reputation: 13318

Unexpected error - MembershipCreateStatus.InvalidQuestion

I try to create user without passwordQuestion and answer.

But I always get an error

MembershipCreateStatus.InvalidQuestion

string question = string.Empty;
string answer = string.Empty;
MembershipUser membershipUser = Membership.CreateUser(user.Login, password, user.ContactInfo.EMail, question, answer, false, out createResult);

web.config

 requiresQuestionAndAnswer="false"

Upvotes: 1

Views: 565

Answers (1)

The_Butcher
The_Butcher

Reputation: 2488

Try using null instead of String.Empty for both question and answer.

Upvotes: 3

Related Questions