Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Access configuration settings from custom configuration files

In the previous post we saw on how to read Configuration settings from the appsettings.json file. While this holds good for most of the cases, there might be situations where we will need our custom configuration file, when we use our own configuration file, we need to specify the file in the Startup and add the file to the ConfigurationBuilder.

In the below case we have a custom configuration file mysettings.json, and we will read the configuration settings from our config file.


This post first appeared on C# Guide, please read the originial post: here

Share the post

Access configuration settings from custom configuration files

×

Subscribe to C# Guide

Get updates delivered right to your inbox!

Thank you for your subscription

×