Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Configuration doc to use double underscores instead of colons for hierarchical config keys (4968) #5876

Merged
merged 15 commits into from
Apr 5, 2018
Merged
8 changes: 4 additions & 4 deletions aspnetcore/fundamentals/configuration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ The app reads and displays the following configuration settings:

[!code-json[](index/sample/ConfigJson/appsettings.json)]

Configuration consists of a hierarchical list of name-value pairs in which the nodes are separated by a colon. To retrieve a value, access the `Configuration` indexer with the corresponding item's key:
Configuration consists of a hierarchical list of name-value pairs in which the nodes are separated by a colon (`:`). To retrieve a value, access the `Configuration` indexer with the corresponding item's key:

[!code-csharp[](index/sample/ConfigJson/Program.cs?range=21-22)]

Expand Down Expand Up @@ -100,15 +100,15 @@ When the environment is set to `Staging`, the following `Configure` method reads

[!code-csharp[](index/sample/StartupConfig.cs?name=snippet&highlight=3,4)]


The environment is typically set to `Development`, `Staging`, or `Production`. For more information, see [Work with multiple environments](xref:fundamentals/environments).

Configuration considerations:

* `IOptionsSnapshot` can reload configuration data when it changes. For more information, see [IOptionsSnapshot](xref:fundamentals/configuration/options#reload-configuration-data-with-ioptionssnapshot).,
* [IOptionsSnapshot](xref:fundamentals/configuration/options#reload-configuration-data-with-ioptionssnapshot) can reload configuration data when it changes.
* Configuration keys are **not** case-sensitive.
* **Never** store passwords or other sensitive data in configuration provider code or in plain text configuration files. Don't use production secrets in development or test environments. Specify secrets outside of the project so that they can't be accidentally committed to a source code repository. Learn more about [how to work with multiple environments](xref:fundamentals/environments) and managing [safe storage of app secrets in development](xref:security/app-secrets).
* If a colon (`:`) can't be used in environment variables on a system, replace the colon (`:`) with a double-underscore (`__`).
* For hierarchical config values specified in environment variables, a colon (`:`) may not work on all platforms. Double underscore (`__`) is supported by all platforms.
* When interacting with the configuration API, a colon (`:`) works on all platforms.

## In-memory provider and binding to a POCO class

Expand Down