I get difficult on deploy encrypt datacache .

Topics: Caching Application Block , Cryptography Application Block, Data Access Application Block
Jul 26, 2008 at 10:17 AM
I use Caching Applications Block to encode my data cache (I use Isolated Storage backing store) . Everything goes fluently but when I deploy on an other computer, I've got this error : "Key not valid for use in specifield state" .
and the content of Stacktrace is :

at System.Security.Cryptography.ProtectedData.Unprotect(Byte[] encryptedData, Byte[] optionalEntropy, DataProtectionScope scope)\r\n   at Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.ProtectedKey.Unprotect()\r\n   at Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.ProtectedKey.get_DecryptedKey()\r\n   at Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.SymmetricCryptographer.get_Key()\r\n   at Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.SymmetricCryptographer.Encrypt(Byte[] plaintext)\r\n   at Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.SymmetricAlgorithmProvider.Encrypt(Byte[] plaintext)\r\n   at Microsoft.Practices.EnterpriseLibrary.Caching.Cryptography.SymmetricStorageEncryptionProvider.Encrypt(Byte[] plaintext)\r

and on the Isolated Storage I've deployed of that computer, I got anything . I've tried fix it but I can't . Please help me. Thanks much
Jul 29, 2008 at 1:03 AM

You need to migrate keys used by the crypto providers. Here's a thread discussing key deployment http://www.codeplex.com/entlib/Thread/View.aspx?ThreadId=26874.