# Accessing configuration information
1. To access configuration information in the Startup class, inject the IConfiguration service provided by the Framework.
2. IConfiguration service is setup to read configuration information from all the various configuration sources in asp.net core
3. If you have a configuration setting with the same key in multiple configuration sources, the later configuration sources override the earlier configuration sources
4. CreateDefaultBuilder() method of the WebHost class which is automatically invoked when the application starts, reads the configuration sources in a specific order.
5. Following is the default order in which the various configuration sources are read
- appsettings.json,
- appsettings.{Environment}.json
- User secrets
- Environment variables
- Command-line arguments
Tuesday, 22 March 2022
Accessing Configuration Information
Subscribe to:
Post Comments (Atom)
Search This Blog
Creating your first "Alexa" Skill
Index What is Alexa What is Alexa Skill? Why is it required when Alexa already equipped with voice assistant? Dev...
About Me
Menu
-
Index What is Alexa What is Alexa Skill? Why is it required when Alexa already equipped with voice assistant? Dev...
-
Adding Azure AD B2C to React Native App Register your app in Azure active directory 1. Go to azure ad b2c, app registratio...
-
# Project file 1. .net Core project file no longer contains file or folder reference - all files and folder present within the root fol...
No comments:
Post a Comment