cancel
Showing results for 
Search instead for 
Did you mean: 

Padding is invalid and cannot be removed

Former Member
0 Kudos

Hi,

I have upgraded my Web tools version from PL02 to PL04 and restored the web tools database to a new instance database. I get the below error when I try to access the web site. I have checked the Private key in the Synch manager and web.config file they are same. I have also tried set hash value (-tasks). it does not work.

Not sure why the version is 620? does it requires an upgrade of database in the installer?

Any suggestions will be helpful?

An Internal Error has occurred.

Version 2007.0.620.0

Message Padding is invalid and cannot be removed.

Source mscorlib

Stack at System.Security.Cryptography.RijndaelManagedTransform.DecryptData(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount, Byte[]& outputBuffer, Int32 outputOffset, PaddingMode paddingMode, Boolean fLast)

at System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)

at System.Security.Cryptography.CryptoStream.Read(Byte[] buffer, Int32 offset, Int32 count)

at System.IO.StreamReader.ReadBuffer()

at System.IO.StreamReader.ReadToEnd()

at netpoint.api.encryption.RMEncryption.DecryptString(String InputText, String Password)

at netpoint.api.encryption.Encryption.Decrypt(String encryptedtext)

at netpoint.api.account.NPUser.Fetch()

at netpoint.api.account.NPUser..ctor(String userid)

at netpoint.providers.NPMembershipProvider.ValidateUser(String username, String password)

at System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e)

at System.Web.UI.WebControls.Login.AttemptLogin()

at System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e)

at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)

at System.Web.UI.WebControls.ImageButton.OnCommand(CommandEventArgs e)

at System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument)

at System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)

at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)

at System.Web.UI.Page.RaisePostBackEvent(NameValueCollectio

Our technical people have been notified.

We're sorry for the inconvenience.

Regards,

Mohan

Edited by: Mohanakrishnan T on Apr 3, 2008 9:28 AM

Accepted Solutions (0)

Answers (3)

Answers (3)

LukaszBloch
Participant
0 Kudos

I have the same problem. is there any solution. I upgraded my webtools from net point 5.97

Former Member
0 Kudos

You might be experiencing a bit of a different problem if you upgraded from 5.9.

Open the installer from the command line in tasks mode(installer -tasks) then Recreate the Hash Key.

This will only work if your private key in the synchmanager matches your private key in the web.config file of the website, also viewable in the installer by selecting the instance representing said website.

Former Member
0 Kudos

Hi,

I am going through the same thing. I started with WebTools 2007 but need to restore a backup of my databases to a different instance. (Live to Test)

I have gone through all of the recommended procedures - recreating the hash key, regenerating the web.config file and no matter what, I get this error when I try to synch. This has got to be a common request in order to backup a production site and restore it to a test site or a different server for that matter. Absolutely nothing seems to get past this 'Padding is invalid...' error in SynchManager. I have recreated an instance with the installer using the -i option and still nothing. The keys are all set the same across the board but this error remains when trying to synchronize - specifically on the manager account record. Does this have anything to do with whether you've chose to use encryption or not? I am using encryption but don't understand why this should make a difference.

Please, we need some help trying to resolve this. This will be an ongoing thing to take the production databases and move them to the test server so we can perform testing and troubleshooting on the latest data. It's just crazy that something so seemingly common would be so difficult to get working. For now, we have no test system and are at a roadblock. I should tell you that I can get past this by choosing 'Initialize Synch' and then 'Run Synch' in Synch Manager but what's the point of that?? I lose all of my data on the web side by doing that - grrrrr.

Thanks for any suggestions in this critical and apparently common dilemma,

David

Former Member
0 Kudos

If data was encrypted using a different key or hash value then decrypting that data will produce this error.

Even if your private keys match now, they must have been different in the past and this is the cause of the error.

This is generally an issue with any software that uses PKI.

Former Member
0 Kudos

Wow thanks. Well, is there anyway to unencrypt the original database so it can be restored easily to another location? I would have thought need to move a production site to a test site on a regular basis would be a fairly common requirement.

Former Member
0 Kudos

A common requirement it certainly is! However in this case makes it none the simpler.

The ability to unencrypt without the correct key would undermine any value in encrypting in the first place; there is no way to do this.

Former Member
0 Kudos

Oh, I completely understand that being able to unecrypt without the correct key would be a huge security hole but I do have the original key from the original site. I guess that's why I am confused that when I restore the production databases to the test site, why can't I simply use the keys from the production site there? Is there no way to force or manually assign a key?

Former Member
0 Kudos

So if I am understanding correctly

- You make a copy of production web tools db(b1webtools), in which you are not receiving any padding error to a new test web tools db(webtoolstest)

- you enter the same private key in the web.config file for this new website that connects to the new test web tools db, webtoolstest

- you enter the same private key into a new synch profile, this profile synchs a test b1 db with webtoolstest db

- you get the padding error

Correct?

Former Member
0 Kudos

You bet - that's exactly it. I get the padding error on the restored databases in Synch Manager until I do an Init Synch - but of course then I lose all of my web data so that isn't an option.

Former Member
0 Kudos

Note that I am also backing up the B1 production database and restoring that to test.

Former Member
0 Kudos

Hi David,

This is a shot in the dark, but could you check the collation on your back up db and the one you are trying to restore to? If they are different it may be that this is causing the error.

Former Member
0 Kudos

M,

I was told to re-install.

Has there been any other input on this matter?

Former Member
0 Kudos

Robert,

I did not reinstall instead I have created a new profile and instance. Other websites works fine for me.

Do you have the same problem for other instances?

Mohan

Former Member
0 Kudos

Hi Mohan,

Please submit a message to SAP Support for this issue.

Bryce Blilie