Membership.CreateUser error

Membership.CreateUser error

Postby chris@byteme » Fri 11 Aug 2006 02:55

When calling "createuser" as follows:

Dim theMem As MembershipUser = Membership.CreateUser(txtUsr.txt, txtPwd.Text)

I get the following error:

System.Configuration.Provider.ProviderException: An exception occurred. Please contact your administrator. ---> System.ArgumentNullException: String reference not set to an instance of a String. Parameter name: s at System.Text.Encoding.GetBytes(String s) at CoreLab.Common.Web.Providers.DbMembershipProvider.b(String A_0) at CoreLab.Common.Web.Providers.DbMembershipProvider.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object userId, MembershipCreateStatus& status) --- End of inner exception stack trace --- at CoreLab.Common.Web.Providers.DbMembershipProvider.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object userId, MembershipCreateStatus& status) at System.Web.Security.Membership.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus& status) at System.Web.Security.Membership.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, MembershipCreateStatus& status) at System.Web.Security.Membership.CreateUser(String username, String password, String email) at System.Web.Security.Membership.CreateUser(String username, String password) at reg.wizReg_NextButtonClick(Object sender, WizardNavigationEventArgs e) in C:\Documents and Settings\Chris\My Documents\Visual Studio 2005\WebSites\books\reg.aspx.vb:line 54
chris@byteme
 
Posts: 14
Joined: Thu 06 Oct 2005 06:23

Postby chris@byteme » Fri 11 Aug 2006 04:44

Okay, more info: I have "requiresQuestionAndAnswer="false"" in web.config, but this error seems to be related to the error "InvalidQuestion". So perhaps it's expecting a question/answer even though I've told it not to?

I know that the case is important in web.config - do I have it right?
chris@byteme
 
Posts: 14
Joined: Thu 06 Oct 2005 06:23

Postby Paul » Fri 11 Aug 2006 07:37

This error was discussed in http://crlab.com/forums/viewtopic.php?t=6618. This fix will be included in the next MySQLDirect .NET build.
Paul
 
Posts: 725
Joined: Thu 28 Oct 2004 14:06


Return to dotConnect for MySQL