Create and Use User Secrets in ASP.NET Core

While developing an ASP.NET Core web application you often come across pieces of information that you wouldn't like to share with others. Consider, for example, a database connection string that contains a user ID and password. You typically store it in appsettings.json file. But when you share your project code with others (say through a version control system) those details are also shared with others. Another example could be access keys or API keys. You might not want to share these details with others. Luckily, ASP.NET Core and Visual Studio provide an easy way to deal with this requirement through what is known as User Secrets.

http://www.binaryintellect.net/articles/64256367-0229-4285-8319-d24f7ce7f0b2.aspx