Hi there. I have a problem doing something. The first thing is that, I used "Membership.CreateUser" rather than "WebSecurity.CreateUserAndAccount" because it is a totally different framework than what am I using, so my professor recommended me to use Membership.CreateUser
instead. But doing so, I always get this error: "the password-answer supplied is invalid". Here is my code:
var confirmationToken = Membership.CreateUser(username, password, email).ToString();
var confirmationUrl = "http://mikepope.com/testmembership/ConfirmAccount?confirmation="
+HttpUtility.UrlEncode(confirmationToken);
var confirmationLink = String.Format("<a href=\"{0}\"></a>", confirmationUrl);
shaniboy26
0 Points
2 Posts
Need help
Aug 30, 2012 01:01 AM|LINK
Hi there. I have a problem doing something. The first thing is that, I used "Membership.CreateUser" rather than "WebSecurity.CreateUserAndAccount" because it is a totally different framework than what am I using, so my professor recommended me to use Membership.CreateUser instead. But doing so, I always get this error: "the password-answer supplied is invalid". Here is my code:
var confirmationToken = Membership.CreateUser(username, password, email).ToString();
var confirmationUrl = "http://mikepope.com/testmembership/ConfirmAccount?confirmation="
+HttpUtility.UrlEncode(confirmationToken);
var confirmationLink = String.Format("<a href=\"{0}\"></a>", confirmationUrl);
Thanks in Advance.
urenjoy
Star
12347 Points
1857 Posts
Re: Need help
Aug 30, 2012 01:08 AM|LINK
Check following:
http://forums.asp.net/t/1016718.aspx/1
http://stackoverflow.com/questions/1445709/error-while-creating-a-membership-user-the-password-answer-supplied-is-invalid