MembershipUser GetPassword() crashes

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
LVdB
Posts: 17
Joined: Mon 11 Sep 2006 12:53

MembershipUser GetPassword() crashes

Post by LVdB » Mon 08 Jan 2007 02:02

The following code crashes on the last line:

Code: Select all

MembershipCreateStatus aStatus;

MembershipUser aNewUser = Membership.CreateUser(SignupUserNameTextBox.Text,
																SignupPasswordTextBox.Text,
																SignupEmailTextBox.Text, // email
																null, // password question
																null, // password answer
																true, // is approved 
																out aStatus);

if (aStatus == MembershipCreateStatus.Success)
{
     string aTest = aNewUser.GetPassword();
}

The exception given is:

Code: Select all

[IndexOutOfRangeException: Index was outside the bounds of the array.]
   System.Security.Cryptography.RijndaelManagedTransform.DecryptData(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount, Byte[]& outputBuffer, Int32 outputOffset, PaddingMode paddingMode, Boolean fLast) +1490301
   System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount) +179
   System.Security.Cryptography.CryptoStream.FlushFinalBlock() +30
   System.Web.Configuration.MachineKeySection.EncryptOrDecryptData(Boolean fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Boolean useValidationSymAlgo) +154
   System.Web.Security.MembershipProvider.DecryptPassword(Byte[] encodedPassword) +107
   CoreLab.Common.Web.Providers.DbMembershipProvider.c(String A_0) +155
   CoreLab.Common.Web.Providers.DbMembershipProvider.a(String A_0, String A_1, Boolean A_2) +266
   CoreLab.Common.Web.Providers.DbMembershipProvider.GetPassword(String username, String answer) +143
   System.Web.Security.MembershipUser.GetPassword() +78
   Controls_Signup.CreateAccountButton_Click(Object sender, EventArgs e) in d:\Dev\WebSites\Whatever\Controls\Signup.ascx.cs:62
I use the following settings in web.config:
It looks like GetPassword should not be crashing this way. Any help greatly appreciated.

Best regards,
Luc

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Tue 09 Jan 2007 08:41

Try to use the latest version of MySQLDirect .NET from our site.
Also provide me with your tag.

LVdB
Posts: 17
Joined: Mon 11 Sep 2006 12:53

Post by LVdB » Tue 09 Jan 2007 12:20

Alexey wrote:Try to use the latest version of MySQLDirect .NET from our site.
Also provide me with your tag.
Here is the machinekey:


LVdB
Posts: 17
Joined: Mon 11 Sep 2006 12:53

Post by LVdB » Tue 09 Jan 2007 14:10

Alexey wrote:Try to use the latest version of MySQLDirect .NET from our site.
I get the following exception using the latest version (3.55.18.0):

Code: Select all

System.Configuration.Provider.ProviderException was unhandled by user code
  Message="Provider can not decode password"
  Source="CoreLab.MySql.Web"
  StackTrace:
       at CoreLab.Common.Web.Providers.DbMembershipProvider.c(String A_0)
       at CoreLab.Common.Web.Providers.DbMembershipProvider.a(String A_0, String A_1, Boolean A_2)
       at CoreLab.Common.Web.Providers.DbMembershipProvider.GetPassword(String username, String answer)
       at System.Web.Security.MembershipUser.GetPassword()
       at Controls_Signup.CreateAccountButton_Click(Object sender, EventArgs e) in d:\Dev\WebSites\Whatever\Controls\Signup.ascx.cs:line 64
       at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
       at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Tue 09 Jan 2007 15:37

That's what I get too.
We will investigate this problem.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Mon 15 Jan 2007 10:12

This problem is fixed.
Look forward to the next build.

LVdB
Posts: 17
Joined: Mon 11 Sep 2006 12:53

Post by LVdB » Mon 15 Jan 2007 18:36

Great!
Have you got any idea when the next build will be released?
Or might I get a private build perhaps ([email protected])?

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Tue 16 Jan 2007 07:12

New build is going to be done by the end of the next week.

Post Reply