467,878 Members | 1,293 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,878 developers. It's quick & easy.

Encrypt app.config for Windows App using Enterprise Library

I am using Enterprise library v3.1 for developing a windows application. its working well.
but there is a security issue, when i deploy this application on client machine the applicationname.exe.config contains connectionString and other secure information. My question is how I can secure applicationname.exe.config file so that anyone could not open it.

I have tried encryption of Data Access Application Block (with both providers RSA & DPAPI) using enterprise library configuration tool. but when I deploy on client machine it gives these errors:

System.Configuration.ConfigurationErrorsException: Failed to decrypt using provider 'RsaProtectedConfigurationProvider'. Error message from the provider: The RSA key container could not
be opened. (C:\Program Files\Tesst APP\Test APP.exe.config line 30) --->

System.Configuration.ConfigurationErrorsException: The RSA key container could not be opened.
System.Configuration.ConfigurationErrorsException: Failed to decrypt using provider 'DataProtectionConfigurationProvider'. Error message from the provider: Key not valid for use in specified state. (Exception from HRESULT: 0x8009000B) (C:\Program Files\Test APP\Test APP.exe.config line 17) ---> System.Runtime.InteropServices.COMException (0x8009000B): Key not valid for use in specified state. (Exception from HRESULT: 0x8009000B).

Also app.config contains
<machineKey validationKey="somevalue" decryptionKey="somevalue" validation="SHA1" />
I want it should be also encrypted.

I will be very thankful for any help.
Feb 1 '08 #1
  • viewed: 1345
Share:

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Chris Durkin | last post: by
2 posts views Thread by Robert | last post: by
8 posts views Thread by =?Utf-8?B?Y2FsZGVyYXJh?= | last post: by
6 posts views Thread by Aneesh P | last post: by
reply views Thread by MrMoon | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.