Encrypt connection string

Topics: Cryptography Application Block, Data Access Application Block, Enterprise Library Core
Jan 5, 2009 at 7:59 AM
Hi All

Currently, I am using the encryption provided by the Enterprise library, it works fine under my development platform.

But after I deployed to production, it doesn't work.

Are there anything I missed?

Regards
Alex
Jan 5, 2009 at 9:00 AM
Did you export the encryption key? See this threads.. http://www.codeplex.com/entlib/Thread/View.aspx?ThreadId=10300
http://www.codeplex.com/entlib/Thread/View.aspx?ThreadId=14769


Sarah Urmeneta
Global Technology & Solutions
Avanade, Inc.
entlib.support@avanade.com
Jan 6, 2009 at 3:43 AM
Thanks.

I have tried and import the "Rsa Key" to production machine. However, it shows this error.

Parser Error Message: Failed to decrypt using provider 'RsaProtectedConfigurationProvider'. Error message from the provider: Bad Data.


Source Error:

Line 121:  </dataConfiguration>
Line 122:  <connectionStrings configProtectionProvider="RsaProtectedConfigurationProvider">
Line 123: <EncryptedData Type="http://www.w3.org/2001/04/xmlenc#Element"Line 124:      xmlns="http://www.w3.org/2001/04/xmlenc#">
Line 125:      <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc" />
Jan 6, 2009 at 4:07 AM
How did you export the encryption key?  Did you put the -pri switch? 


Sarah Urmeneta
Global Technology & Solutions
Avanade, Inc.
entlib.support@avanade.com
Jan 6, 2009 at 4:23 AM
Yes, I put the -pri switch.
Jan 6, 2009 at 6:16 AM
Hi,

Have you granted permission to your aspnet user?

Valiant Dudan
Global Technology & Solutions
Avanade, Inc.
entlib.support@avanade.com