This might be a duplicate (question) but I am looking specifically for the .NET best practise.
How to store database connection strings, username and password etc. in a safe way? Is an encrypted app.config best in most cases?
I would also like to be able to set the password in the config file and then have it encrypted as soon as the application starts. (I am not asking for a solution as I have solved this before, I'm just looking for best practise(s)).
I'm also interested in alternative solutions that you have good experiences with.