Outils pour utilisateurs

Outils du site


web:asp.net:core:configuration

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
web:asp.net:core:configuration [2022/02/02 00:42] – modification externe 127.0.0.1web:asp.net:core:configuration [2023/11/17 20:09] (Version actuelle) – [Providers] sgariepy
Ligne 94: Ligne 94:
 </code> </code>
  
 +
 +====== Providers ======
 +
 +
 +^ Provider  ^ Exemple  ^ Notes ^
 +| appsettings.json  | ''{ "key": "value" }''  |   |
 +| appsettings.{ENVIRONMENT}.json  | ''{ "key": "other value" }''  |   |
 +| User Secrets (Developement) | ''dotnet user-secrets set "key" "development value"'' | |
 +| Environment variables  | Powershell: ''setx key "environment value"'', bash: ''export key="environment value"''  | | 
 +| Command-line arguments  | ''dotnet run --key "important value"''  |  | 
 +
 +
 +L'environnement est lu de ''DOTNET_ENVIRONMENT'' ou ''ASPNETCORE_ENVIRONMENT''.
 +
 +
 +
 +Source: [[https://stenbrinke.nl/blog/configuration-and-secret-management-in-dotnet/|Everything you need to know about configuration and secret management in .NET]]
  
  
web/asp.net/core/configuration.1643758967.txt.gz · Dernière modification : 2022/02/02 00:42 de 127.0.0.1