I need to encrypt data in my app.config file. I am looking at Protected Configuration as described on MSDN here. I have to encrypt passwords for connection strings (not the entire connection string, just the passwords, since parts of the string like databases and even machines are composed from several variables inside my code) as well as some API keys. Can I use aspnet_regiis.exe
in a NON-WEB application? I have self-contained services written using ServiceStack.
I have multiple instances of my servers which means I have to EXPORT the encrypted configuration sections and import them on other computers as described here.
Does anybody have some experience with that and can confirm it works without IIS being installed on the server(s)?
And other tricky question: Is there any way to read such an encrypted section if the server runs in .NET core, e.g in a docker container??
Thanks for sharing some experiences!