8

I am wondering how to encrypt configuration settings, especially connection string in ASP.Net Core app.

The configuration files are in json.

0

1 Answer 1

8

With encryption, your options are to build a custom configuration provider that loads the encrypted data and decrypts accordingly. You can check this SO answer here covering the same topic. That SO answer refers to this guide of the asp.net docs on how to create a custom provider configuration.

If encryption is not strictly necessary there is a dedicated page on asp.net documentation for safe storage of app secrets during development which you can read here. Please note that these do NOT use encryption and involve using environment variables and/or using the Secret Manager tool.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.