Two files MyApp.Exe.XML after the instalation: one with Connection-String encrypted the other in plain text

52 Views Asked by At

The application with Connection-String encrypted the first time the user run the program. (RsaProtectedConfigurationProvider)

Using the classical "Shared Sub ToggleConfigEncryption(ByVal exeConfigName As String)" https://msdn.microsoft.com/en-us/library/89211k9b(v=vs.80).aspx?cs-save-lang=1&cs-lang=vb

After the installation and execution of the program on another computer I have two folders on AppData\Local\Apps....

one of this folder with the APP.Config encrypted and the other one with no encryption at all. I proved deleting this second file and the application still run fine.

But why this file exist with plain text after running the program?

Note: Program published using Visual Studio

1

There are 1 best solutions below

0
On BEST ANSWER

I "solved" this situation creating only a portable app.

1) Publish the app on local mode 2) Rename the files inside the APP folder to get rid of the .deploy extension 3) Run the APP from the .exe file