Hi,
I am in process of upgrading to Visual Studio 2008 from 2003. Most of the upgrade is easy except this one issue:
When application is trying to Decrypt encrypted data from database, it is throwing following error. This code works fine with Visual Studio 2003. Can someone help me with this and tell me cause of the problem and how to fix this?
System.Security.Cryptography.CryptographicExceptio n occurred
Message="Bad Data. "
Source="mscorlib"
StackTrace:
at System.Security.Cryptography.CryptographicExceptio n.ThrowCryptogaphicException(Int32 hr)
at System.Security.Cryptography.Utils._DecryptData(Sa feKeyHandle hKey, Byte[] data, Int32 ib, Int32 cb, Byte[]& outputBuffer, Int32 outputOffset, PaddingMode PaddingMode, Boolean fDone)
at System.Security.Cryptography.CryptoAPITransform.Tr ansformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
at System.Security.Cryptography.CryptoStream.FlushFin alBlock()
at PGAS.Util.Encryption.Transform(String vstrString, ICryptoTransform vobjCryptoTransform) in C:\Releases\PGAS 8.0.0\3M UI\3MUtil\Util_UIMT\Encryption.vb:line 129
InnerException:
Thanks,
Vivek Agarwal