crash of website when trying to Manage a User

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
2/19/2008 12:23:13 PM
Gravatar
Total Posts 27
~~~~~~~~~~~~~~

crash of website when trying to Manage a User

Hi Joe,

From the memberlist I try to access the ManagerUser page. The Server error below appears.

I am using MS SQL 2005 and Mojo 2246

 

 

Roger

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~``

Length of the data to decrypt is invalid.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Security.Cryptography.CryptographicException: Length of the data to decrypt is invalid.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[CryptographicException: Length of the data to decrypt is invalid.]
System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount) +1544950
System.Security.Cryptography.CryptoStream.FlushFinalBlock() +30
System.Web.Configuration.MachineKeySection.EncryptOrDecryptData(Boolean fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Boolean useValidationSymAlgo) +164
System.Web.Security.MembershipProvider.DecryptPassword(Byte[] encodedPassword) +107
mojoPortal.Web.mojoMembershipProvider.DecryptPassword(Byte[] encodedPassword) +4
mojoPortal.Web.mojoMembershipProvider.UnencodePassword(String pass, MembershipPasswordFormat passwordFormat) +88
mojoPortal.Web.AdminUI.ManageUsers.PopulateControls() +1656
mojoPortal.Web.AdminUI.ManageUsers.Page_Load(Object sender, EventArgs e) +687
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436


 

2/20/2008 9:26:50 AM
Gravatar
Total Posts 18439

Re: crash of website when trying to Manage a User

Hi Roger,

Sounds like its trying to decrypt a password that isn't encrypted or possibly one that was encrypted with a different machine key. I would look in the db and see if it looks like an encrypted password or not.

Is this happening on just one user or on all users?

When you upgraded you got the new web.config file. If your old Web.config file had a custom machinekey then you need to restore it from your old web.config. If the machine key changes it can't decrypt anything that was encrypted with the old key so its important never to change your machine key.

There is a known bug when you create a new site it fails to encrypt the new site admin's password, so you should create the site with plain text password format and then after its created you can change it to encrypted and will encrypt it correctly that way. This bug isalready fixed in svn.

Hope it helps,

Joe

3/24/2008 5:33:09 AM
Gravatar
Total Posts 27
~~~~~~~~~~~~~~

Re: crash of website when trying to Manage a User

Hi Joe,

 

Sorry for my late reply.

 

I have tested your suggestions.

The machine keys in both the old web.config and the new.config are the same.

It happens to all users.

Also the following (I suspect it has something to do with my problem) server error occurs when trying to recover a password:

 

Server Error in '/' Application.
--------------------------------------------------------------------------------

Length of the data to decrypt is invalid.

 

 

Thanks,

Roger
 

3/24/2008 8:36:21 AM
Gravatar
Total Posts 18439

Re: crash of website when trying to Manage a User

Hi Roger,

I dug into this further today and believe I have found and fixed the cause of the problem. I will be uploading a new set of release packages in just a little while.

Thanks,

Joe

You must sign in to post in the forums. This thread is closed to new posts.