Securing sensitive parts of the App.config/web.config

As a developer, you will undoubtedly work with sensitive information such as passwords. How you handle this information during development is very important. In the past, I have received copies of a client's live database to use for testing. This does pose a very real security risk for your client.

Often, we keep settings in a web.config file (when working with web applications). For this example, though, I will be demonstrating a console application that uses an App.config file. The same logic can be applied to a web.config file too.

Get C# 7 and .NET Core Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.