New article
Recently updated
Padding is Invalid and Cannot be Removed
Who is this article for?Support Engineers helping users find a solution to invalid padding.
Application System Administrator access is required.
This article confronts the technical challenge presented by the error: Padding is Invalid and Cannot be Removed. See the sections below for insights and practical solutions.
1. Issue
User get an error message when trying to open a work programme after trying to secure back up the programme. This might be due to part of the programme remaining on the user's local store.
Below is the error message that has been reported:
Error Message: EX:0 [System.Security.Cryptography.CryptographicException]
Padding is invalid and cannot be removed.
at System.Security.Cryptography.CapiSymmetricAlgorithm.DepadBlock(Byte[] block, Int32 offset, Int32 count)
at System.Security.Cryptography.CapiSymmetricAlgorithm.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
at System.Security.Cryptography.CryptoStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at MK.Core.StreamEx.CopyStream(Stream source, Stream dest)
at AuditVision.Interface.DataSerializeFS.Deserialize[T](LocalDataSerializePackageBase package, String filePath)
at AuditVision.Interface.LocalStoreFS.LoadObject[T](LocalDataSerializePackageBase package, String filePath, String lockName)
at AuditVision.WorkProgrammes.WorkProgramme.Load(String filePath)
at AuditVision.WorkProgrammeEditor.WorkProgrammeStoreIndexItem.ExecuteAction(ViewManagerActionEventArgs e)
2. Solution
- Ensure all work programmes have been secured to the server.
- Select Help, then Customer Support and open the local data store in file explorer.
- Open the 0001 or first folder listed and select Audit Work folder.
- Create a new folder and label as Old.
- Drag and drop the contents of the audit work folder into the Old folder.
- Close file explorer.
Note: The files ending in _ro.wp are read only. The files ending in .wp are the editable programs.
- Return to the Audit Work Module in the application and select the Refresh tab.
- The programme should be visible as a editable item i.e., blue/green globe.
- Check the programme can be open for editing and can be secured back to the server.