Using key management
Keys are the best-kept secrets of your application. Keys are used to encrypt and decrypt a lot of sensitive data. This means the keys themselves are even more sensitive; they hold the power to unlock all your secrets. Storing a key in a text file next to an executable might not be the best way to treat this valuable piece of data.
How and where you store the keys depends on where you run your program. If your application lives in the cloud, you should use a cloud-based key management system. If you run your systems on a machine you can touch, you need another solution.
Using the Azure Key Vault
The Azure Key Vault is a centralized, cloud-based secret and key management solution. It is straightforward to set up and easy to use. Its main purpose is to guard secrets and keys for Azure-based applications. However, it can also be used by applications running on-premise.
I will not teach you how to create a key vault here; plenty of resources can help you...