I get an padding invalid and cannot be removed error when trying to initalize the scutex web services

Jan 30, 2012 at 10:57 PM
Edited Jan 31, 2012 at 1:00 AM

I get an padding invalid and cannot be removed error when trying to initalize the scutex services and so scutex freezes up.

This is the error I get below:

System.Reflection.TargetInvocationException was unhandled
Message=An exception occurred during the operation, making the result invalid. Check InnerException for exception details. and the InnerException says that padding is invalid and cannot be removed. Could you please help me with this error?

Feb 1, 2012 at 7:17 PM

The "Padding is invalid" exception normally is due to the encryption keys not set and/or not working properly. There should be a number of config files in the web service with parts of the encryption keys required to encrypt and decrypt the transmissions from the licensing client, there should be 3 .config files per service (Client and Master) for a total of 6, in the root of your web services directory. An {GUID}-IN.config, {GUID}-OUT.config and {GUID}-TK.config. These are combined with keys inside the the database of your web service which are stored in the services Master table. The InboundKey is paired with the {GUID}-IN.config in the web service Client/Management, and the OutboundKey is paired with the {GUID}-OUT.config in the web service Client/Manager.

You will need to check to verify that all the conifg files are present and have data in them, they will just look like random strings. Then you need to check to ensure the Master table on the web services database is populated as well. You can then take that data and combine it to see if it matches the keys in your Scutex database in the Services table. Commonly if there is an error during initialization and Scutex doesn't know it will mark the service as initialized even though it isn't.

You can watch Video 3 on http://www.wtdt.com/Products/Scutex/ScutexVideos.aspx for some guidance on web service creation.



Feb 3, 2012 at 10:32 PM
Edited Feb 4, 2012 at 12:40 AM

I have created the database with the script provided but when I check the values they end up blank. I also checked the script to see if it would enter the values for me and it doesn't do it. I was wondering if I have to manually input the data in the database?

Feb 9, 2012 at 8:48 PM

No the data should be automatically populated when the service get initialized. This is why your getting the padding is incorrect error. You need to ensure that your connection string in the web.config is correct and the user, either the one running the worker process, or the SQL user in the connection string, has rights to the database, use the db_owner role for the database.