473,387 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 13 '08 #1
0 4634

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

Similar topics

0
by: Chris Durkin | last post by:
What is the "correct" .NET 2.0 way to do this from within a class library? For example, say I have a connection string in app.config or web.config added using the VS2005 IDE, like so: ...
2
by: Robert | last post by:
I am trying to run ASP.Net 2.0 pages within a ASP.Net 1.1 application. The 2.0 pages are located in a sub-directory of the 1.1 application. Once I create a new web.config file in the 2.0 folder the...
4
by: google | last post by:
OK, I know how to encrypt and decrypt data, but here's the deal: I have a large Winforms .NET 2.0 application which is currently storing the connection string in the app.config file unencrypted...
2
by: malice | last post by:
I have been searching the internet for 12+ hours on how to do this. At this point I'm about to give up. I am using VB .Net 2.0 with the enterprise library jan 2006 release. This is my first time...
1
by: Marc B. | last post by:
I've been beating my head against the wall trying to do what appears to be really straight forward. I've been attempting the Walkthrough: Creating and Exporting an RSA Key Container...
1
by: vikram | last post by:
anyone have any code which reads current app.config and loads its value in tree view, using c#, 2.0 ?
8
by: =?Utf-8?B?Y2FsZGVyYXJh?= | last post by:
Dear all, I am building a set of libraries working in a n tiers architecture Some of those libraries use common configuration settings like the database connection string and some others. I...
6
by: Aneesh P | last post by:
Hi All, I need to encrypt some fields esp password key values in configuration file while installting the application using .Net installer project and decrypt those values from my...
2
by: rockdale | last post by:
I followed this article, http://msdn2.microsoft.com/en-us/library/zhhddkxy.aspx My command is: aspnet_regiis -pe "connectionStrings" -app "/myWebSiteName" -site 711831 -prov...
0
by: zeenets | last post by:
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.