I used this article to encrypt my app.config
. The problem is that when I test this app on another computer and that system couldn't decrypt the connection string.
I also read this article on MSDN and note that
The connection string can only be decrypted on the computer on which it was encrypted.
Now how can I encrypt connection string in app.config
?
As you mentioned that you want solution for appconfig . You can easily apply the same solution as the web.config you just have to rename your app.config to web.config, encrypt with the aspnet_regiis tool and then rename it back to app.config.
You can open it in notepad to see the encrypted file. In visualstudio you will see it decrypted. You can use your connection string the same way as if it was not encrypted.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With