[{"data":1,"prerenderedAt":2341},["Reactive",2],{"navigation":3,"/posts/lost-in-configuration":204,"/posts/lost-in-configuration-surround":2311},[4,192,200],{"title":5,"_path":6,"children":7,"icon":191},"Blog","/posts",[8,11,14,17,20,23,26,29,32,35,38,41,44,47,50,53,56,59,62,65,68,71,74,77,80,83,86,89,92,95,98,101,104,107,110,113,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,176,179,182,185,188],{"title":9,"_path":10},"Testing your API with REST Client","/posts/testing-your-api-with-rest-client",{"title":12,"_path":13},"HTML templating in Xamarin","/posts/html-templating-in-xamarin",{"title":15,"_path":16},"Goodbye Azure Portal, Welcome Azure CLI","/posts/welcome-azure-cli",{"title":18,"_path":19},"Coming across Gitpod","/posts/gitpod",{"title":21,"_path":22},"Handle token retrieval while querying an API","/posts/delegating-handler",{"title":24,"_path":25},"Clean up your local git branches.","/posts/cleaning-git-branches",{"title":27,"_path":28},"Automate configuration of Teams Tab SSO with PowerShell.","/posts/teams-sso-powershell",{"title":30,"_path":31},"How to do a technology watch? - Part 1","/posts/technology-watch-part1",{"title":33,"_path":34},"How to do a technology watch? - Part 2","/posts/technology-watch-part2",{"title":36,"_path":37},"You almost no longer need Key Vault references for Azure Functions.","/posts/azure-functions-custom-configuration",{"title":39,"_path":40},"How to do a technology watch? - Part 3","/posts/technology-watch-part3",{"title":42,"_path":43},"Forget DevOps, the future is already here!","/posts/devops-future",{"title":45,"_path":46},"Week 9, 2021 - Tips I learned this week","/posts/w09-2021-tips-learned-this-week",{"title":48,"_path":49},"Week 12, 2021 - Tips I learned this week","/posts/w12-2021-tips-learned-this-week",{"title":51,"_path":52},"Week 14, 2021 - Tips I learned this week","/posts/w14-2021-tips-learned-this-week",{"title":54,"_path":55},"Once upon a time in .NET","/posts/once-upon-a-time-in-dotnet",{"title":57,"_path":58},"Install your applications with winget","/posts/winget-import",{"title":60,"_path":61},"Customize your applications when installing them with winget","/posts/winget-override",{"title":63,"_path":64},"Week 22, 2021 - Tips I learned this week","/posts/w22-2021-tips-learned-this-week",{"title":66,"_path":67},"How to connect to an Azure SQL Database from C# using Azure AD","/posts/sqlclient-active-directory-authent",{"title":69,"_path":70},"Producing packages for Windows Package Manager","/posts/wingetcreate",{"title":72,"_path":73},"4 tips about GitHub Actions environment variables and contexts","/posts/github-actions-var-and-context",{"title":75,"_path":76},"AzureWebJobsStorage, the secret you don't need in your Function App.","/posts/azure-functions-without-azurewebjobsstorage",{"title":78,"_path":79},"ASP.NET Core - Lost in configuration","/posts/lost-in-configuration",{"title":81,"_path":82},"Week 39, 2021 - Tips I learned this week","/posts/w39-2021-tips-learned-this-week",{"title":84,"_path":85},"Week 41, 2021 - Tips I learned this week","/posts/w41-2021-tips-learned-this-week",{"title":87,"_path":88},"Migrating and open-sourcing my blog","/posts/migrating-blog",{"title":90,"_path":91},"Week 45, 2021 - Tips I learned this week","/posts/w45-2021-tips-learned-this-week",{"title":93,"_path":94},"Organize your GitHub stars with Astral","/posts/astral",{"title":96,"_path":97},"Pulumi with an Azure Blob Storage backend","/posts/pulumi-azure-backend",{"title":99,"_path":100},"IaC Hot Reload with Pulumi Watch","/posts/pulumi-watch",{"title":102,"_path":103},"Week 2, 2022 - Tips I learned this week","/posts/w02-2022-tips-learned-this-week",{"title":105,"_path":106},"Week 3, 2022 - Tips I learned this week","/posts/w03-2022-tips-learned-this-week",{"title":108,"_path":109},"Week 5, 2022 - Tips I learned this week","/posts/w05-2022-tips-learned-this-week",{"title":111,"_path":112},"How to provision an Azure SQL Database with Active Directory authentication","/posts/sqldatabase-active-directory-authent",{"title":114,"_path":115},"Why will I choose Pulumi over Terraform for my next project?","/posts/pulumi-vs-terraform",{"title":117,"_path":118},"Week 19, 2022 - Tips I learned this week","/posts/w19-2022-tips-learned-this-week",{"title":120,"_path":121},"Week 20, 2022 - Tips I learned this week","/posts/w20-2022-tips-learned-this-week",{"title":123,"_path":124},"Keeping secrets secure when using API Clients","/posts/http-clients-secrets",{"title":126,"_path":127},"What made me want to be a developer?","/posts/be-a-developer",{"title":129,"_path":130},"What can we do when stuck with a programming problem?","/posts/get-unstuck",{"title":132,"_path":133},"How did I automate the setup of my developer Windows laptop?","/posts/automate-developer-machine",{"title":135,"_path":136},"Discussion about API clients","/posts/http-clients",{"title":138,"_path":139},"Week 46, 2022 - Tips I learned this week","/posts/w46-2022-tips-learned-this-week",{"title":141,"_path":142},"When Pulumi met Nuke: a .NET love story","/posts/when-pulumi-met-nuke",{"title":144,"_path":145},"A year of learning and sharing - Dev Retro 2022","/posts/2022-retro",{"title":147,"_path":148},"Perform Dynamic Execution of an npm Package","/posts/pnpm-dlx",{"title":150,"_path":151},"Manage multiple Node.js versions","/posts/pnpm-env",{"title":153,"_path":154},"Introducing the Vue.js CI/CD series","/posts/vuecicd-introduction",{"title":156,"_path":157},"Execute commands using your project dependencies","/posts/pnpm-exec",{"title":159,"_path":160},"Vue.js CI/CD: Continuous Integration","/posts/vuecicd-ci",{"title":162,"_path":163},"Who is using pnpm?","/posts/pnpm-who-is-using",{"title":165,"_path":166},"Create an Azure-Ready GitHub Repository using Pulumi","/posts/azure-ready-github-repository",{"title":168,"_path":169},"Deploying to Azure from Azure DevOps without secrets","/posts/ado-workload-identity-federation",{"title":171,"_path":172},"Effortlessly Configure GitHub Repositories for Azure Deployment via OIDC","/posts/scripting-azure-ready-github-repository",{"title":174,"_path":175},"Playing with the .NET 8 Web API template","/posts/playing-with-dotnet8",{"title":177,"_path":178},"Another year of sharing and learning - Dev Retro 2023","/posts/2023-retro",{"title":180,"_path":181},"Week 4, 2024 - Tips I learned this week","/posts/w04-2024-tips-learned-this-week",{"title":183,"_path":184},"Using dependency injection with Azure .NET SDK","/posts/azure-sdk-di",{"title":186,"_path":187},"Having Fun With IT Event Calendars","/posts/it-event-calendars",{"title":189,"_path":190},"Call your Azure AD B2C protected API with authenticated HTTP requests from your JetBrains IDE","/posts/http-clients-oauth2","i-heroicons-newspaper",{"title":193,"_path":194,"children":195,"icon":199},"Goodies","/goodies",[196],{"title":197,"_path":198},"My Git Cheat Sheet","/goodies/gitcheatsheet","i-heroicons-gift-solid",{"title":201,"_path":202,"icon":203},"About","/about","i-heroicons-user-circle-solid",{"_path":79,"_dir":205,"_draft":206,"_partial":206,"_locale":207,"title":78,"description":208,"lead":209,"date":210,"image":211,"badge":213,"tags":215,"body":220,"_type":2306,"_id":2307,"_source":2308,"_file":2309,"_extension":2310},"posts",false,"","Have you ever felt a bit overwhelmed by the configuration in a project, not knowing where to look for the settings between the command line parameters, the environment variables, the configuration files in code, the configuration in Azure, ... ? When developing an ASP.NET Core application there are many places where you can put your configuration which makes it difficult to know where you should put it. Even if the official documentation about configuration in ASP.NET Core is very complete and well written, it only describes what you can use and how to use it, not what you should use and when. In this article,     I will try to answer these questions and give you my opinion about how we should use configuration providers in ASP.NET Core.","How should you use configuration providers in ASP.NET Core?","2021-09-27T00:00:00.000Z",{"src":212},"/images/tokyo.jpg",{"label":214},"Development",[216,217,218,219],"ASP.NET Core","configuration","Azure Key Vault","Azure",{"type":221,"children":222,"toc":2293},"root",[223,242,249,254,259,271,277,282,291,305,1033,1061,1070,1075,1084,1111,1117,1122,1134,1160,1186,1192,1197,1206,1211,1217,1222,1239,1282,1291,1297,1302,1340,1349,1354,1359,1671,1676,1682,1696,1705,1710,2084,2090,2100,2114,2162,2171,2202,2208,2213,2218,2282,2287],{"type":224,"tag":225,"props":226,"children":227},"element","p",{},[228,231,240],{"type":229,"value":230},"text","Have you ever felt a bit overwhelmed by the configuration in a project, not knowing where to look for the settings between the command line parameters, the environment variables, the configuration files in code, the configuration in Azure, ... ? When developing an ASP.NET Core application there are many places where you can put your configuration which makes it difficult to know where you should put it. Even if the ",{"type":224,"tag":232,"props":233,"children":237},"a",{"href":234,"rel":235},"https://docs.microsoft.com/en-us/aspnet/core/fundamentals/configuration/",[236],"nofollow",[238],{"type":229,"value":239},"official documentation",{"type":229,"value":241}," about configuration in ASP.NET Core is very complete and well written, it only describes what you can use and how to use it, not what you should use and when. In this article,     I will try to answer these questions and give you my opinion about how we should use configuration providers in ASP.NET Core.",{"type":224,"tag":243,"props":244,"children":246},"h2",{"id":245},"a-quick-reminder-about-configuration",[247],{"type":229,"value":248},"A quick reminder about configuration",{"type":224,"tag":225,"props":250,"children":251},{},[252],{"type":229,"value":253},"Configuration is what allows you to quickly change how an application behaves by modifying a setting instead of rewriting the code. Configuration/settings are sometimes linked to the environment where your application runs but not always. Generally, when something is likely to change, a good practice is to define a setting for it in the configuration instead of hard coding it in the source code.",{"type":224,"tag":225,"props":255,"children":256},{},[257],{"type":229,"value":258},"Configuration can take many forms and ASP.NET Core has this powerful concept of configurations providers that read configuration data from different sources. But in the end, configuration is just a collection of key-value pairs.",{"type":224,"tag":225,"props":260,"children":261},{},[262],{"type":224,"tag":263,"props":264,"children":270},"img",{"alt":265,"className":266,"src":269},"Values in Startup.cs configuration in debug.",[267,268],"rounded-lg","mx-auto","/posts/images/lostinconfiguration_providers_2.png",[],{"type":224,"tag":243,"props":272,"children":274},{"id":273},"why-do-i-have-so-many-configuration-providers-by-default",[275],{"type":229,"value":276},"Why do I have so many configuration providers by default?",{"type":224,"tag":225,"props":278,"children":279},{},[280],{"type":229,"value":281},"When you create a new ASP.NET Core project from a template and run it, you have probably noticed that your configuration is not empty and that by default, multiple configuration providers are already registered.",{"type":224,"tag":225,"props":283,"children":284},{},[285],{"type":224,"tag":263,"props":286,"children":290},{"alt":287,"className":288,"src":289},"Configuration providers in Startup.cs configuration in debug.",[267,268],"/posts/images/lostinconfiguration_providers_1.pngpng",[],{"type":224,"tag":225,"props":292,"children":293},{},[294,296,303],{"type":229,"value":295},"Do not worry there is no magic here, it just comes from the call ",{"type":224,"tag":297,"props":298,"children":300},"code",{"className":299},[],[301],{"type":229,"value":302},"Host.CreateDefaultBuilder(args)",{"type":229,"value":304}," in your Program.cs.\nHere is an extract of what does this method:",{"type":224,"tag":306,"props":307,"children":311},"pre",{"className":308,"code":309,"language":310,"meta":207,"style":207},"language-csharp shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","builder.ConfigureAppConfiguration((hostingContext, config) =>\n{\n    IHostEnvironment env = hostingContext.HostingEnvironment;\n    bool reloadOnChange = GetReloadConfigOnChangeValue(hostingContext);\n    config.AddJsonFile(\"appsettings.json\", optional: true, reloadOnChange: reloadOnChange)\n          .AddJsonFile($\"appsettings.{env.EnvironmentName}.json\", optional: true, reloadOnChange:reloadOnChange);\n    if (env.IsDevelopment() && env.ApplicationName is { Length: > 0 })\n    {\n        var appAssembly = Assembly.Load(new AssemblyName(env.ApplicationName));\n        if (appAssembly is not null)\n        {\n            config.AddUserSecrets(appAssembly, optional: true, reloadOnChange: reloadOnChange);\n        }\n    }\n    config.AddEnvironmentVariables();\n    if (args is { Length: > 0 })\n    {\n        config.AddCommandLine(args);\n    }\n})\n","csharp",[312],{"type":224,"tag":297,"props":313,"children":314},{"__ignoreMap":207},[315,370,379,417,454,532,629,715,724,788,820,829,892,901,910,932,977,985,1016,1024],{"type":224,"tag":316,"props":317,"children":320},"span",{"class":318,"line":319},"line",1,[321,327,333,339,344,350,355,360,365],{"type":224,"tag":316,"props":322,"children":324},{"style":323},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[325],{"type":229,"value":326},"builder",{"type":224,"tag":316,"props":328,"children":330},{"style":329},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[331],{"type":229,"value":332},".",{"type":224,"tag":316,"props":334,"children":336},{"style":335},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[337],{"type":229,"value":338},"ConfigureAppConfiguration",{"type":224,"tag":316,"props":340,"children":341},{"style":329},[342],{"type":229,"value":343},"((",{"type":224,"tag":316,"props":345,"children":347},{"style":346},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[348],{"type":229,"value":349},"hostingContext",{"type":224,"tag":316,"props":351,"children":352},{"style":329},[353],{"type":229,"value":354},",",{"type":224,"tag":316,"props":356,"children":357},{"style":346},[358],{"type":229,"value":359}," config",{"type":224,"tag":316,"props":361,"children":362},{"style":329},[363],{"type":229,"value":364},")",{"type":224,"tag":316,"props":366,"children":367},{"style":329},[368],{"type":229,"value":369}," =>\n",{"type":224,"tag":316,"props":371,"children":373},{"class":318,"line":372},2,[374],{"type":224,"tag":316,"props":375,"children":376},{"style":329},[377],{"type":229,"value":378},"{\n",{"type":224,"tag":316,"props":380,"children":382},{"class":318,"line":381},3,[383,388,393,398,403,407,412],{"type":224,"tag":316,"props":384,"children":385},{"style":346},[386],{"type":229,"value":387},"    IHostEnvironment",{"type":224,"tag":316,"props":389,"children":390},{"style":346},[391],{"type":229,"value":392}," env",{"type":224,"tag":316,"props":394,"children":395},{"style":329},[396],{"type":229,"value":397}," =",{"type":224,"tag":316,"props":399,"children":400},{"style":323},[401],{"type":229,"value":402}," hostingContext",{"type":224,"tag":316,"props":404,"children":405},{"style":329},[406],{"type":229,"value":332},{"type":224,"tag":316,"props":408,"children":409},{"style":323},[410],{"type":229,"value":411},"HostingEnvironment",{"type":224,"tag":316,"props":413,"children":414},{"style":329},[415],{"type":229,"value":416},";\n",{"type":224,"tag":316,"props":418,"children":420},{"class":318,"line":419},4,[421,426,431,435,440,445,449],{"type":224,"tag":316,"props":422,"children":423},{"style":329},[424],{"type":229,"value":425},"    bool",{"type":224,"tag":316,"props":427,"children":428},{"style":346},[429],{"type":229,"value":430}," reloadOnChange",{"type":224,"tag":316,"props":432,"children":433},{"style":329},[434],{"type":229,"value":397},{"type":224,"tag":316,"props":436,"children":437},{"style":335},[438],{"type":229,"value":439}," GetReloadConfigOnChangeValue",{"type":224,"tag":316,"props":441,"children":442},{"style":329},[443],{"type":229,"value":444},"(",{"type":224,"tag":316,"props":446,"children":447},{"style":323},[448],{"type":229,"value":349},{"type":224,"tag":316,"props":450,"children":451},{"style":329},[452],{"type":229,"value":453},");\n",{"type":224,"tag":316,"props":455,"children":457},{"class":318,"line":456},5,[458,463,467,472,476,481,487,491,495,500,505,511,515,519,523,527],{"type":224,"tag":316,"props":459,"children":460},{"style":323},[461],{"type":229,"value":462},"    config",{"type":224,"tag":316,"props":464,"children":465},{"style":329},[466],{"type":229,"value":332},{"type":224,"tag":316,"props":468,"children":469},{"style":335},[470],{"type":229,"value":471},"AddJsonFile",{"type":224,"tag":316,"props":473,"children":474},{"style":329},[475],{"type":229,"value":444},{"type":224,"tag":316,"props":477,"children":478},{"style":329},[479],{"type":229,"value":480},"\"",{"type":224,"tag":316,"props":482,"children":484},{"style":483},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[485],{"type":229,"value":486},"appsettings.json",{"type":224,"tag":316,"props":488,"children":489},{"style":329},[490],{"type":229,"value":480},{"type":224,"tag":316,"props":492,"children":493},{"style":329},[494],{"type":229,"value":354},{"type":224,"tag":316,"props":496,"children":497},{"style":346},[498],{"type":229,"value":499}," optional",{"type":224,"tag":316,"props":501,"children":502},{"style":329},[503],{"type":229,"value":504},":",{"type":224,"tag":316,"props":506,"children":508},{"style":507},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[509],{"type":229,"value":510}," true",{"type":224,"tag":316,"props":512,"children":513},{"style":329},[514],{"type":229,"value":354},{"type":224,"tag":316,"props":516,"children":517},{"style":346},[518],{"type":229,"value":430},{"type":224,"tag":316,"props":520,"children":521},{"style":329},[522],{"type":229,"value":504},{"type":224,"tag":316,"props":524,"children":525},{"style":323},[526],{"type":229,"value":430},{"type":224,"tag":316,"props":528,"children":529},{"style":329},[530],{"type":229,"value":531},")\n",{"type":224,"tag":316,"props":533,"children":535},{"class":318,"line":534},6,[536,541,545,549,554,559,564,569,573,578,583,588,592,596,600,604,608,612,616,620,625],{"type":224,"tag":316,"props":537,"children":538},{"style":329},[539],{"type":229,"value":540},"          .",{"type":224,"tag":316,"props":542,"children":543},{"style":335},[544],{"type":229,"value":471},{"type":224,"tag":316,"props":546,"children":547},{"style":329},[548],{"type":229,"value":444},{"type":224,"tag":316,"props":550,"children":551},{"style":329},[552],{"type":229,"value":553},"$\"",{"type":224,"tag":316,"props":555,"children":556},{"style":483},[557],{"type":229,"value":558},"appsettings.",{"type":224,"tag":316,"props":560,"children":561},{"style":329},[562],{"type":229,"value":563},"{",{"type":224,"tag":316,"props":565,"children":566},{"style":323},[567],{"type":229,"value":568},"env",{"type":224,"tag":316,"props":570,"children":571},{"style":329},[572],{"type":229,"value":332},{"type":224,"tag":316,"props":574,"children":575},{"style":323},[576],{"type":229,"value":577},"EnvironmentName",{"type":224,"tag":316,"props":579,"children":580},{"style":329},[581],{"type":229,"value":582},"}",{"type":224,"tag":316,"props":584,"children":585},{"style":483},[586],{"type":229,"value":587},".json",{"type":224,"tag":316,"props":589,"children":590},{"style":329},[591],{"type":229,"value":480},{"type":224,"tag":316,"props":593,"children":594},{"style":329},[595],{"type":229,"value":354},{"type":224,"tag":316,"props":597,"children":598},{"style":346},[599],{"type":229,"value":499},{"type":224,"tag":316,"props":601,"children":602},{"style":329},[603],{"type":229,"value":504},{"type":224,"tag":316,"props":605,"children":606},{"style":507},[607],{"type":229,"value":510},{"type":224,"tag":316,"props":609,"children":610},{"style":329},[611],{"type":229,"value":354},{"type":224,"tag":316,"props":613,"children":614},{"style":346},[615],{"type":229,"value":430},{"type":224,"tag":316,"props":617,"children":618},{"style":329},[619],{"type":229,"value":504},{"type":224,"tag":316,"props":621,"children":622},{"style":323},[623],{"type":229,"value":624},"reloadOnChange",{"type":224,"tag":316,"props":626,"children":627},{"style":329},[628],{"type":229,"value":453},{"type":224,"tag":316,"props":630,"children":632},{"class":318,"line":631},7,[633,639,644,648,652,657,662,667,671,675,680,685,690,695,699,704,710],{"type":224,"tag":316,"props":634,"children":636},{"style":635},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF;--shiki-light-font-style:italic;--shiki-default-font-style:italic;--shiki-dark-font-style:italic",[637],{"type":229,"value":638},"    if",{"type":224,"tag":316,"props":640,"children":641},{"style":329},[642],{"type":229,"value":643}," (",{"type":224,"tag":316,"props":645,"children":646},{"style":323},[647],{"type":229,"value":568},{"type":224,"tag":316,"props":649,"children":650},{"style":329},[651],{"type":229,"value":332},{"type":224,"tag":316,"props":653,"children":654},{"style":335},[655],{"type":229,"value":656},"IsDevelopment",{"type":224,"tag":316,"props":658,"children":659},{"style":329},[660],{"type":229,"value":661},"()",{"type":224,"tag":316,"props":663,"children":664},{"style":329},[665],{"type":229,"value":666}," &&",{"type":224,"tag":316,"props":668,"children":669},{"style":323},[670],{"type":229,"value":392},{"type":224,"tag":316,"props":672,"children":673},{"style":329},[674],{"type":229,"value":332},{"type":224,"tag":316,"props":676,"children":677},{"style":323},[678],{"type":229,"value":679},"ApplicationName ",{"type":224,"tag":316,"props":681,"children":682},{"style":329},[683],{"type":229,"value":684},"is",{"type":224,"tag":316,"props":686,"children":687},{"style":329},[688],{"type":229,"value":689}," {",{"type":224,"tag":316,"props":691,"children":692},{"style":323},[693],{"type":229,"value":694}," Length",{"type":224,"tag":316,"props":696,"children":697},{"style":329},[698],{"type":229,"value":504},{"type":224,"tag":316,"props":700,"children":701},{"style":329},[702],{"type":229,"value":703}," >",{"type":224,"tag":316,"props":705,"children":707},{"style":706},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[708],{"type":229,"value":709}," 0",{"type":224,"tag":316,"props":711,"children":712},{"style":329},[713],{"type":229,"value":714}," })\n",{"type":224,"tag":316,"props":716,"children":718},{"class":318,"line":717},8,[719],{"type":224,"tag":316,"props":720,"children":721},{"style":329},[722],{"type":229,"value":723},"    {\n",{"type":224,"tag":316,"props":725,"children":727},{"class":318,"line":726},9,[728,733,738,742,747,751,756,761,766,770,774,778,783],{"type":224,"tag":316,"props":729,"children":730},{"style":346},[731],{"type":229,"value":732},"        var",{"type":224,"tag":316,"props":734,"children":735},{"style":346},[736],{"type":229,"value":737}," appAssembly",{"type":224,"tag":316,"props":739,"children":740},{"style":329},[741],{"type":229,"value":397},{"type":224,"tag":316,"props":743,"children":744},{"style":323},[745],{"type":229,"value":746}," Assembly",{"type":224,"tag":316,"props":748,"children":749},{"style":329},[750],{"type":229,"value":332},{"type":224,"tag":316,"props":752,"children":753},{"style":335},[754],{"type":229,"value":755},"Load",{"type":224,"tag":316,"props":757,"children":758},{"style":329},[759],{"type":229,"value":760},"(new",{"type":224,"tag":316,"props":762,"children":763},{"style":346},[764],{"type":229,"value":765}," AssemblyName",{"type":224,"tag":316,"props":767,"children":768},{"style":329},[769],{"type":229,"value":444},{"type":224,"tag":316,"props":771,"children":772},{"style":323},[773],{"type":229,"value":568},{"type":224,"tag":316,"props":775,"children":776},{"style":329},[777],{"type":229,"value":332},{"type":224,"tag":316,"props":779,"children":780},{"style":323},[781],{"type":229,"value":782},"ApplicationName",{"type":224,"tag":316,"props":784,"children":785},{"style":329},[786],{"type":229,"value":787},"));\n",{"type":224,"tag":316,"props":789,"children":791},{"class":318,"line":790},10,[792,797,801,806,810,815],{"type":224,"tag":316,"props":793,"children":794},{"style":635},[795],{"type":229,"value":796},"        if",{"type":224,"tag":316,"props":798,"children":799},{"style":329},[800],{"type":229,"value":643},{"type":224,"tag":316,"props":802,"children":803},{"style":323},[804],{"type":229,"value":805},"appAssembly ",{"type":224,"tag":316,"props":807,"children":808},{"style":329},[809],{"type":229,"value":684},{"type":224,"tag":316,"props":811,"children":812},{"style":329},[813],{"type":229,"value":814}," not",{"type":224,"tag":316,"props":816,"children":817},{"style":329},[818],{"type":229,"value":819}," null)\n",{"type":224,"tag":316,"props":821,"children":823},{"class":318,"line":822},11,[824],{"type":224,"tag":316,"props":825,"children":826},{"style":329},[827],{"type":229,"value":828},"        {\n",{"type":224,"tag":316,"props":830,"children":832},{"class":318,"line":831},12,[833,838,842,847,851,856,860,864,868,872,876,880,884,888],{"type":224,"tag":316,"props":834,"children":835},{"style":323},[836],{"type":229,"value":837},"            config",{"type":224,"tag":316,"props":839,"children":840},{"style":329},[841],{"type":229,"value":332},{"type":224,"tag":316,"props":843,"children":844},{"style":335},[845],{"type":229,"value":846},"AddUserSecrets",{"type":224,"tag":316,"props":848,"children":849},{"style":329},[850],{"type":229,"value":444},{"type":224,"tag":316,"props":852,"children":853},{"style":323},[854],{"type":229,"value":855},"appAssembly",{"type":224,"tag":316,"props":857,"children":858},{"style":329},[859],{"type":229,"value":354},{"type":224,"tag":316,"props":861,"children":862},{"style":346},[863],{"type":229,"value":499},{"type":224,"tag":316,"props":865,"children":866},{"style":329},[867],{"type":229,"value":504},{"type":224,"tag":316,"props":869,"children":870},{"style":507},[871],{"type":229,"value":510},{"type":224,"tag":316,"props":873,"children":874},{"style":329},[875],{"type":229,"value":354},{"type":224,"tag":316,"props":877,"children":878},{"style":346},[879],{"type":229,"value":430},{"type":224,"tag":316,"props":881,"children":882},{"style":329},[883],{"type":229,"value":504},{"type":224,"tag":316,"props":885,"children":886},{"style":323},[887],{"type":229,"value":430},{"type":224,"tag":316,"props":889,"children":890},{"style":329},[891],{"type":229,"value":453},{"type":224,"tag":316,"props":893,"children":895},{"class":318,"line":894},13,[896],{"type":224,"tag":316,"props":897,"children":898},{"style":329},[899],{"type":229,"value":900},"        }\n",{"type":224,"tag":316,"props":902,"children":904},{"class":318,"line":903},14,[905],{"type":224,"tag":316,"props":906,"children":907},{"style":329},[908],{"type":229,"value":909},"    }\n",{"type":224,"tag":316,"props":911,"children":913},{"class":318,"line":912},15,[914,918,922,927],{"type":224,"tag":316,"props":915,"children":916},{"style":323},[917],{"type":229,"value":462},{"type":224,"tag":316,"props":919,"children":920},{"style":329},[921],{"type":229,"value":332},{"type":224,"tag":316,"props":923,"children":924},{"style":335},[925],{"type":229,"value":926},"AddEnvironmentVariables",{"type":224,"tag":316,"props":928,"children":929},{"style":329},[930],{"type":229,"value":931},"();\n",{"type":224,"tag":316,"props":933,"children":935},{"class":318,"line":934},16,[936,940,944,949,953,957,961,965,969,973],{"type":224,"tag":316,"props":937,"children":938},{"style":635},[939],{"type":229,"value":638},{"type":224,"tag":316,"props":941,"children":942},{"style":329},[943],{"type":229,"value":643},{"type":224,"tag":316,"props":945,"children":946},{"style":323},[947],{"type":229,"value":948},"args ",{"type":224,"tag":316,"props":950,"children":951},{"style":329},[952],{"type":229,"value":684},{"type":224,"tag":316,"props":954,"children":955},{"style":329},[956],{"type":229,"value":689},{"type":224,"tag":316,"props":958,"children":959},{"style":323},[960],{"type":229,"value":694},{"type":224,"tag":316,"props":962,"children":963},{"style":329},[964],{"type":229,"value":504},{"type":224,"tag":316,"props":966,"children":967},{"style":329},[968],{"type":229,"value":703},{"type":224,"tag":316,"props":970,"children":971},{"style":706},[972],{"type":229,"value":709},{"type":224,"tag":316,"props":974,"children":975},{"style":329},[976],{"type":229,"value":714},{"type":224,"tag":316,"props":978,"children":980},{"class":318,"line":979},17,[981],{"type":224,"tag":316,"props":982,"children":983},{"style":329},[984],{"type":229,"value":723},{"type":224,"tag":316,"props":986,"children":988},{"class":318,"line":987},18,[989,994,998,1003,1007,1012],{"type":224,"tag":316,"props":990,"children":991},{"style":323},[992],{"type":229,"value":993},"        config",{"type":224,"tag":316,"props":995,"children":996},{"style":329},[997],{"type":229,"value":332},{"type":224,"tag":316,"props":999,"children":1000},{"style":335},[1001],{"type":229,"value":1002},"AddCommandLine",{"type":224,"tag":316,"props":1004,"children":1005},{"style":329},[1006],{"type":229,"value":444},{"type":224,"tag":316,"props":1008,"children":1009},{"style":323},[1010],{"type":229,"value":1011},"args",{"type":224,"tag":316,"props":1013,"children":1014},{"style":329},[1015],{"type":229,"value":453},{"type":224,"tag":316,"props":1017,"children":1019},{"class":318,"line":1018},19,[1020],{"type":224,"tag":316,"props":1021,"children":1022},{"style":329},[1023],{"type":229,"value":909},{"type":224,"tag":316,"props":1025,"children":1027},{"class":318,"line":1026},20,[1028],{"type":224,"tag":316,"props":1029,"children":1030},{"style":329},[1031],{"type":229,"value":1032},"})\n",{"type":224,"tag":225,"props":1034,"children":1035},{},[1036,1038,1044,1046,1051,1053,1059],{"type":229,"value":1037},"As you can see, by default this ",{"type":224,"tag":297,"props":1039,"children":1041},{"className":1040},[],[1042],{"type":229,"value":1043},"CreateDefaultBuilder",{"type":229,"value":1045}," method loads configuration data using different configuration providers. You can load additional configuration by calling the ",{"type":224,"tag":297,"props":1047,"children":1049},{"className":1048},[],[1050],{"type":229,"value":338},{"type":229,"value":1052}," in the ",{"type":224,"tag":297,"props":1054,"children":1056},{"className":1055},[],[1057],{"type":229,"value":1058},"Program.cs",{"type":229,"value":1060}," like in the example which uses Azure Key Vault configuration provider.",{"type":224,"tag":225,"props":1062,"children":1063},{},[1064],{"type":224,"tag":263,"props":1065,"children":1069},{"alt":1066,"className":1067,"src":1068},"Code for using ConfigureAppConfiguration in Program.cs.",[267,268],"/posts/images/lostinconfiguration_providers_4.png",[],{"type":224,"tag":225,"props":1071,"children":1072},{},[1073],{"type":229,"value":1074},"It is important to know that order in which the configuration provider is specified matters: in case multiple providers load different values for the same setting, the value of the last provider specifying this setting is the one that will be used in the configuration. You can see in which order the configuration is loaded from different sources in the method documentation.",{"type":224,"tag":225,"props":1076,"children":1077},{},[1078],{"type":224,"tag":263,"props":1079,"children":1083},{"alt":1080,"className":1081,"src":1082},"CreateDefaultBuilder documentation in IDE.",[267,268],"/posts/images/lostinconfiguration_providers_3.png",[],{"type":224,"tag":225,"props":1085,"children":1086},{},[1087,1089,1095,1097,1102,1104,1109],{"type":229,"value":1088},"If the order in which configuration providers are registered by default does not suit you, then you can simply create the ",{"type":224,"tag":297,"props":1090,"children":1092},{"className":1091},[],[1093],{"type":229,"value":1094},"HostBuilder",{"type":229,"value":1096}," yourself in ",{"type":224,"tag":297,"props":1098,"children":1100},{"className":1099},[],[1101],{"type":229,"value":1058},{"type":229,"value":1103}," instead of using ",{"type":224,"tag":297,"props":1105,"children":1107},{"className":1106},[],[1108],{"type":229,"value":1043},{"type":229,"value":1110}," method.",{"type":224,"tag":243,"props":1112,"children":1114},{"id":1113},"how-to-have-a-global-view-of-the-configuration-used-by-your-application",[1115],{"type":229,"value":1116},"How to have a global view of the configuration used by your application?",{"type":224,"tag":225,"props":1118,"children":1119},{},[1120],{"type":229,"value":1121},"Having different providers to load the configuration in your application is great but one drawback is that the configuration is scattered all over the place. Indeed sometimes we want to have the complete list of settings an application uses and if we have to look everywhere (key vault, environment variables, JSON files,...) it becomes impossible to manage.",{"type":224,"tag":225,"props":1123,"children":1124},{},[1125,1127,1132],{"type":229,"value":1126},"What I advise is to put all the settings you use in your application in the ",{"type":224,"tag":297,"props":1128,"children":1130},{"className":1129},[],[1131],{"type":229,"value":486},{"type":229,"value":1133}," file. It does not mean you will put all the values there too or that the values you put there will be the ones that your application will use. But it means that you will have one place where you can quickly look what are the different settings keys. And concerning the values of these settings, if they should come from another file or provider (because they are relative to an environment or because they are secrets for instance), that is not a problem just put a blank value.",{"type":224,"tag":225,"props":1135,"children":1136},{},[1137,1139,1144,1146,1151,1153,1158],{"type":229,"value":1138},"So why using the ",{"type":224,"tag":297,"props":1140,"children":1142},{"className":1141},[],[1143],{"type":229,"value":486},{"type":229,"value":1145}," file for that? In the last section, I showed the code that loads some configuration by default and you may have noticed that this settings file is the first loaded into configuration. That means any following configuration source will override the existing values coming from the ",{"type":224,"tag":297,"props":1147,"children":1149},{"className":1148},[],[1150],{"type":229,"value":486},{"type":229,"value":1152}," file, so having all the settings declared in the ",{"type":224,"tag":297,"props":1154,"children":1156},{"className":1155},[],[1157],{"type":229,"value":486},{"type":229,"value":1159}," file won't be a problem even if some have blank values (they will be overridden by the values loaded after).",{"type":224,"tag":1161,"props":1162,"children":1164},"callout",{"icon":1163},"i-heroicons-chat-bubble-left-20-solid",[1165],{"type":224,"tag":225,"props":1166,"children":1167},{},[1168,1170,1177,1179,1185],{"type":229,"value":1169},"When running your application locally, if you want to display what are the values of the settings in your configuration and where their values come from you can read ",{"type":224,"tag":232,"props":1171,"children":1174},{"href":1172,"rel":1173},"https://andrewlock.net/debugging-configuration-values-in-aspnetcore/",[236],[1175],{"type":229,"value":1176},"this article",{"type":229,"value":1178}," by Andrew Lock that explains how to do that using the ",{"type":224,"tag":297,"props":1180,"children":1182},{"className":1181},[],[1183],{"type":229,"value":1184},"IConfigurationRoot.GetDebugView()",{"type":229,"value":1110},{"type":224,"tag":243,"props":1187,"children":1189},{"id":1188},"what-about-configuration-in-an-app-service-or-an-azure-function-is-it-a-specific-configuration-provider",[1190],{"type":229,"value":1191},"What about configuration in an App Service or an Azure Function, is it a specific configuration provider?",{"type":224,"tag":225,"props":1193,"children":1194},{},[1195],{"type":229,"value":1196},"Well, the answer is no. Application settings in the configuration of an App Service or a Function App (the settings you can see in the Azure portal) are passed as environment variables to the application.",{"type":224,"tag":225,"props":1198,"children":1199},{},[1200],{"type":224,"tag":263,"props":1201,"children":1205},{"alt":1202,"className":1203,"src":1204},"Application settings in the configuration of an App Service.",[267,268],"/posts/images/lostinconfiguration_azureconfig_1.png",[],{"type":224,"tag":225,"props":1207,"children":1208},{},[1209],{"type":229,"value":1210},"If you remember in which order the providers are registered, it means that configuration in Azure will override most of the configuration coming from other providers.",{"type":224,"tag":243,"props":1212,"children":1214},{"id":1213},"where-to-put-environment-dependent-configuration",[1215],{"type":229,"value":1216},"Where to put environment-dependent configuration?",{"type":224,"tag":225,"props":1218,"children":1219},{},[1220],{"type":229,"value":1221},"As the name suggests, environment variables are a good place to set your environment-dependent configuration. If you are deploying your ASP.NET Core application in an Azure App Service, you can set these environment variables in the application settings section of your App Service in the Azure portal. However, I guess you are probably using an Infrastructure as Code tool (like Pulumi or Terraform) instead of manually modifying your Azure resources in the portal, so that means your environment-dependent configuration will be stored among your infrastructure code and deployed to Azure with the rest of the infrastructure.",{"type":224,"tag":1161,"props":1223,"children":1224},{"icon":1163},[1225],{"type":224,"tag":225,"props":1226,"children":1227},{},[1228,1230,1237],{"type":229,"value":1229},"To know more about how are managed Environments in ASP.NET Core you can read ",{"type":224,"tag":232,"props":1231,"children":1234},{"href":1232,"rel":1233},"https://docs.microsoft.com/en-us/aspnet/core/fundamentals/environments",[236],[1235],{"type":229,"value":1236},"this page of the official documentation",{"type":229,"value":1238}," that talks about that.",{"type":224,"tag":225,"props":1240,"children":1241},{},[1242,1244,1249,1251,1257,1259,1265,1267,1273,1275,1280],{"type":229,"value":1243},"Using environment variables is a good approach but it is less convenient than having settings in your JSON settings files. Moreover, if these environment settings are only in your cloud resources, you will miss some settings when you debug your application locally. That's why I think it is a good idea to take advantage of ASP.NET Core default behavior  (see ",{"type":224,"tag":297,"props":1245,"children":1247},{"className":1246},[],[1248],{"type":229,"value":1043},{"type":229,"value":1250}," implementation above) of loading the ",{"type":224,"tag":297,"props":1252,"children":1254},{"className":1253},[],[1255],{"type":229,"value":1256},"appsettings",{"type":229,"value":1258}," JSON file corresponding to the current environment. That way, if you have for example a staging environment you can set the environment variable ",{"type":224,"tag":297,"props":1260,"children":1262},{"className":1261},[],[1263],{"type":229,"value":1264},"ASPNETCORE_ENVIRONMENT",{"type":229,"value":1266}," to staging and put all your configuration for staging in the ",{"type":224,"tag":297,"props":1268,"children":1270},{"className":1269},[],[1271],{"type":229,"value":1272},"appsettings.staging.json",{"type":229,"value":1274},". This may not work for everything as some settings depend on your infrastructure deployment (maybe you only know the value of a setting after the deployment of the infrastructure), but in that case you will put these settings in your environment variables thanks to your infrastructure code and anyway that should not prevent you from putting them in your ",{"type":224,"tag":297,"props":1276,"children":1278},{"className":1277},[],[1279],{"type":229,"value":486},{"type":229,"value":1281}," files afterward to make local debug easier.",{"type":224,"tag":225,"props":1283,"children":1284},{},[1285],{"type":224,"tag":263,"props":1286,"children":1290},{"alt":1287,"className":1288,"src":1289},"App settings files in files explorer of an IDE.",[267,268],"/posts/images/lostinconfiguration_appsettings_1.png",[],{"type":224,"tag":243,"props":1292,"children":1294},{"id":1293},"how-to-deal-with-secrets-in-my-application-configuration",[1295],{"type":229,"value":1296},"How to deal with secrets in my application configuration?",{"type":224,"tag":225,"props":1298,"children":1299},{},[1300],{"type":229,"value":1301},"There are multiple ways of handling secrets but there is one fundamental rule: 'never commit a secret in source control'. Whatever the context, there is no valid reason that justifies putting a value in source code, that's it.",{"type":224,"tag":225,"props":1303,"children":1304},{},[1305,1307,1314,1316,1322,1324,1331,1333,1338],{"type":229,"value":1306},"One easy way to avoid having secrets in your source code is to use ",{"type":224,"tag":232,"props":1308,"children":1311},{"href":1309,"rel":1310},"https://docs.microsoft.com/en-us/aspnet/core/security/app-secrets#secret-manager",[236],[1312],{"type":229,"value":1313},"Secret Manager",{"type":229,"value":1315},". It is a nice tool that allows you to put your secrets in a ",{"type":224,"tag":297,"props":1317,"children":1319},{"className":1318},[],[1320],{"type":229,"value":1321},"secrets.json",{"type":229,"value":1323}," file stored in your user profile directory (thus not committed with the rest of the code). When your application runs locally, secrets are loaded from this file in your application configuration thanks to the ",{"type":224,"tag":232,"props":1325,"children":1328},{"href":1326,"rel":1327},"https://docs.microsoft.com/en-us/aspnet/core/fundamentals/configuration/?view=aspnetcore-5.0#file-configuration-provider",[236],[1329],{"type":229,"value":1330},"File configuration provider",{"type":229,"value":1332}," and everything works fine without having to put secrets in the configuration files in source control (",{"type":224,"tag":297,"props":1334,"children":1336},{"className":1335},[],[1337],{"type":229,"value":486},{"type":229,"value":1339}," for instance).",{"type":224,"tag":225,"props":1341,"children":1342},{},[1343],{"type":224,"tag":263,"props":1344,"children":1348},{"alt":1345,"className":1346,"src":1347},"Secrets.json file and option to generate it in Visual Studio.",[267,268],"/posts/images/lostinconfiguration_secrets_1.png",[],{"type":224,"tag":225,"props":1350,"children":1351},{},[1352],{"type":229,"value":1353},"Secret manager is interesting to debug your application locally when developing but apart from that you will want to use a vault to safely store your secrets and make them available to your application. Each cloud provider has its vault solution: Azure Key Vault, AWS Secret Manager, Google Cloud Secret Manager, and there are also third-party vaults like HashiCorp Vault for instance. To integrate with a vault, you could write your own custom provider that loads the secrets from the vault into configuration but for each of these vaults, there is a configuration provider package supported by the editor or the community.",{"type":224,"tag":225,"props":1355,"children":1356},{},[1357],{"type":229,"value":1358},"For instance, to inject secrets from an Azure KeyVault in your configuration you should use the following code:",{"type":224,"tag":306,"props":1360,"children":1362},{"className":308,"code":1361,"language":310,"meta":207,"style":207},"public static IHostBuilder CreateHostBuilder(string[] args) =>\n    Host.CreateDefaultBuilder()\n        .ConfigureAppConfiguration((context, config) =>\n        {\n            var keyVaultEndpoint = new Uri(Environment.GetEnvironmentVariable(\"VaultUri\"));\n            config.AddAzureKeyVault(keyVaultEndpoint, new DefaultAzureCredential());\n        })\n        .ConfigureWebHostDefaults(webBuilder =>\n        {\n            webBuilder.UseStartup\u003CStartup>();\n        });\n",[1363],{"type":224,"tag":297,"props":1364,"children":1365},{"__ignoreMap":207},[1366,1417,1438,1475,1482,1548,1591,1599,1624,1631,1663],{"type":224,"tag":316,"props":1367,"children":1368},{"class":318,"line":319},[1369,1375,1380,1385,1390,1394,1399,1404,1409,1413],{"type":224,"tag":316,"props":1370,"children":1372},{"style":1371},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[1373],{"type":229,"value":1374},"public",{"type":224,"tag":316,"props":1376,"children":1377},{"style":1371},[1378],{"type":229,"value":1379}," static",{"type":224,"tag":316,"props":1381,"children":1382},{"style":346},[1383],{"type":229,"value":1384}," IHostBuilder",{"type":224,"tag":316,"props":1386,"children":1387},{"style":335},[1388],{"type":229,"value":1389}," CreateHostBuilder",{"type":224,"tag":316,"props":1391,"children":1392},{"style":329},[1393],{"type":229,"value":444},{"type":224,"tag":316,"props":1395,"children":1396},{"style":329},[1397],{"type":229,"value":1398},"string",{"type":224,"tag":316,"props":1400,"children":1401},{"style":329},[1402],{"type":229,"value":1403},"[]",{"type":224,"tag":316,"props":1405,"children":1406},{"style":346},[1407],{"type":229,"value":1408}," args",{"type":224,"tag":316,"props":1410,"children":1411},{"style":329},[1412],{"type":229,"value":364},{"type":224,"tag":316,"props":1414,"children":1415},{"style":329},[1416],{"type":229,"value":369},{"type":224,"tag":316,"props":1418,"children":1419},{"class":318,"line":372},[1420,1425,1429,1433],{"type":224,"tag":316,"props":1421,"children":1422},{"style":323},[1423],{"type":229,"value":1424},"    Host",{"type":224,"tag":316,"props":1426,"children":1427},{"style":329},[1428],{"type":229,"value":332},{"type":224,"tag":316,"props":1430,"children":1431},{"style":335},[1432],{"type":229,"value":1043},{"type":224,"tag":316,"props":1434,"children":1435},{"style":329},[1436],{"type":229,"value":1437},"()\n",{"type":224,"tag":316,"props":1439,"children":1440},{"class":318,"line":381},[1441,1446,1450,1454,1459,1463,1467,1471],{"type":224,"tag":316,"props":1442,"children":1443},{"style":329},[1444],{"type":229,"value":1445},"        .",{"type":224,"tag":316,"props":1447,"children":1448},{"style":335},[1449],{"type":229,"value":338},{"type":224,"tag":316,"props":1451,"children":1452},{"style":329},[1453],{"type":229,"value":343},{"type":224,"tag":316,"props":1455,"children":1456},{"style":346},[1457],{"type":229,"value":1458},"context",{"type":224,"tag":316,"props":1460,"children":1461},{"style":329},[1462],{"type":229,"value":354},{"type":224,"tag":316,"props":1464,"children":1465},{"style":346},[1466],{"type":229,"value":359},{"type":224,"tag":316,"props":1468,"children":1469},{"style":329},[1470],{"type":229,"value":364},{"type":224,"tag":316,"props":1472,"children":1473},{"style":329},[1474],{"type":229,"value":369},{"type":224,"tag":316,"props":1476,"children":1477},{"class":318,"line":419},[1478],{"type":224,"tag":316,"props":1479,"children":1480},{"style":329},[1481],{"type":229,"value":828},{"type":224,"tag":316,"props":1483,"children":1484},{"class":318,"line":456},[1485,1490,1495,1499,1504,1509,1513,1518,1522,1527,1531,1535,1540,1544],{"type":224,"tag":316,"props":1486,"children":1487},{"style":346},[1488],{"type":229,"value":1489},"            var",{"type":224,"tag":316,"props":1491,"children":1492},{"style":346},[1493],{"type":229,"value":1494}," keyVaultEndpoint",{"type":224,"tag":316,"props":1496,"children":1497},{"style":329},[1498],{"type":229,"value":397},{"type":224,"tag":316,"props":1500,"children":1501},{"style":329},[1502],{"type":229,"value":1503}," new",{"type":224,"tag":316,"props":1505,"children":1506},{"style":346},[1507],{"type":229,"value":1508}," Uri",{"type":224,"tag":316,"props":1510,"children":1511},{"style":329},[1512],{"type":229,"value":444},{"type":224,"tag":316,"props":1514,"children":1515},{"style":323},[1516],{"type":229,"value":1517},"Environment",{"type":224,"tag":316,"props":1519,"children":1520},{"style":329},[1521],{"type":229,"value":332},{"type":224,"tag":316,"props":1523,"children":1524},{"style":335},[1525],{"type":229,"value":1526},"GetEnvironmentVariable",{"type":224,"tag":316,"props":1528,"children":1529},{"style":329},[1530],{"type":229,"value":444},{"type":224,"tag":316,"props":1532,"children":1533},{"style":329},[1534],{"type":229,"value":480},{"type":224,"tag":316,"props":1536,"children":1537},{"style":483},[1538],{"type":229,"value":1539},"VaultUri",{"type":224,"tag":316,"props":1541,"children":1542},{"style":329},[1543],{"type":229,"value":480},{"type":224,"tag":316,"props":1545,"children":1546},{"style":329},[1547],{"type":229,"value":787},{"type":224,"tag":316,"props":1549,"children":1550},{"class":318,"line":534},[1551,1555,1559,1564,1568,1573,1577,1581,1586],{"type":224,"tag":316,"props":1552,"children":1553},{"style":323},[1554],{"type":229,"value":837},{"type":224,"tag":316,"props":1556,"children":1557},{"style":329},[1558],{"type":229,"value":332},{"type":224,"tag":316,"props":1560,"children":1561},{"style":335},[1562],{"type":229,"value":1563},"AddAzureKeyVault",{"type":224,"tag":316,"props":1565,"children":1566},{"style":329},[1567],{"type":229,"value":444},{"type":224,"tag":316,"props":1569,"children":1570},{"style":323},[1571],{"type":229,"value":1572},"keyVaultEndpoint",{"type":224,"tag":316,"props":1574,"children":1575},{"style":329},[1576],{"type":229,"value":354},{"type":224,"tag":316,"props":1578,"children":1579},{"style":329},[1580],{"type":229,"value":1503},{"type":224,"tag":316,"props":1582,"children":1583},{"style":346},[1584],{"type":229,"value":1585}," DefaultAzureCredential",{"type":224,"tag":316,"props":1587,"children":1588},{"style":329},[1589],{"type":229,"value":1590},"());\n",{"type":224,"tag":316,"props":1592,"children":1593},{"class":318,"line":631},[1594],{"type":224,"tag":316,"props":1595,"children":1596},{"style":329},[1597],{"type":229,"value":1598},"        })\n",{"type":224,"tag":316,"props":1600,"children":1601},{"class":318,"line":717},[1602,1606,1611,1615,1620],{"type":224,"tag":316,"props":1603,"children":1604},{"style":329},[1605],{"type":229,"value":1445},{"type":224,"tag":316,"props":1607,"children":1608},{"style":335},[1609],{"type":229,"value":1610},"ConfigureWebHostDefaults",{"type":224,"tag":316,"props":1612,"children":1613},{"style":329},[1614],{"type":229,"value":444},{"type":224,"tag":316,"props":1616,"children":1617},{"style":346},[1618],{"type":229,"value":1619},"webBuilder",{"type":224,"tag":316,"props":1621,"children":1622},{"style":329},[1623],{"type":229,"value":369},{"type":224,"tag":316,"props":1625,"children":1626},{"class":318,"line":726},[1627],{"type":224,"tag":316,"props":1628,"children":1629},{"style":329},[1630],{"type":229,"value":828},{"type":224,"tag":316,"props":1632,"children":1633},{"class":318,"line":790},[1634,1639,1643,1648,1653,1658],{"type":224,"tag":316,"props":1635,"children":1636},{"style":323},[1637],{"type":229,"value":1638},"            webBuilder",{"type":224,"tag":316,"props":1640,"children":1641},{"style":329},[1642],{"type":229,"value":332},{"type":224,"tag":316,"props":1644,"children":1645},{"style":335},[1646],{"type":229,"value":1647},"UseStartup",{"type":224,"tag":316,"props":1649,"children":1650},{"style":329},[1651],{"type":229,"value":1652},"\u003C",{"type":224,"tag":316,"props":1654,"children":1655},{"style":346},[1656],{"type":229,"value":1657},"Startup",{"type":224,"tag":316,"props":1659,"children":1660},{"style":329},[1661],{"type":229,"value":1662},">();\n",{"type":224,"tag":316,"props":1664,"children":1665},{"class":318,"line":822},[1666],{"type":224,"tag":316,"props":1667,"children":1668},{"style":329},[1669],{"type":229,"value":1670},"        });\n",{"type":224,"tag":225,"props":1672,"children":1673},{},[1674],{"type":229,"value":1675},"Vaults are generally cheap and anyway it is not as if security was an optional feature we should choose to add or not, therefore there is no reason not to use a vault to keep your secrets safe.",{"type":224,"tag":243,"props":1677,"children":1679},{"id":1678},"how-to-share-configuration-between-different-applications",[1680],{"type":229,"value":1681},"How to share configuration between different applications?",{"type":224,"tag":225,"props":1683,"children":1684},{},[1685,1687,1694],{"type":229,"value":1686},"There is a specific Azure component for that which is ",{"type":224,"tag":232,"props":1688,"children":1691},{"href":1689,"rel":1690},"https://docs.microsoft.com/en-us/azure/azure-app-configuration/overview",[236],[1692],{"type":229,"value":1693},"Azure App Configuration",{"type":229,"value":1695},". It provides you a centralized place to manage your configuration for different applications, environments and locations. It also provides you other interesting features like the ability to dynamically change the value of an application setting without the need to restart this application.",{"type":224,"tag":225,"props":1697,"children":1698},{},[1699],{"type":224,"tag":263,"props":1700,"children":1704},{"alt":1701,"className":1702,"src":1703},"Configuration explorer in an Azure App Configuration resource.",[267,268],"/posts/images/lostinconfiguration_appconfig_1.png",[],{"type":224,"tag":225,"props":1706,"children":1707},{},[1708],{"type":229,"value":1709},"Azure App Configuration has its configuration provider that you can register like that:",{"type":224,"tag":306,"props":1711,"children":1713},{"className":308,"code":1712,"language":310,"meta":207,"style":207},"public static IHostBuilder CreateHostBuilder(string[] args) =>\n    Host.CreateDefaultBuilder()\n        .ConfigureAppConfiguration((context, config) =>\n        {\n            var settings = config.Build();\n            var appConfigurationConnectionUri = new Uri(settings.GetValue\u003Cstring>(\"Endpoints:AppConfig\"));\n            config.AddAzureAppConfiguration(options =>\n            {\n                options.Connect(appConfigurationConnectionUri, new DefaultAzureCredential());\n            });\n        })\n        .ConfigureWebHostDefaults(webBuilder =>\n        {\n            webBuilder.UseStartup\u003CStartup>();\n        });\n",[1714],{"type":224,"tag":297,"props":1715,"children":1716},{"__ignoreMap":207},[1717,1760,1779,1814,1821,1854,1926,1955,1963,2005,2013,2020,2043,2050,2077],{"type":224,"tag":316,"props":1718,"children":1719},{"class":318,"line":319},[1720,1724,1728,1732,1736,1740,1744,1748,1752,1756],{"type":224,"tag":316,"props":1721,"children":1722},{"style":1371},[1723],{"type":229,"value":1374},{"type":224,"tag":316,"props":1725,"children":1726},{"style":1371},[1727],{"type":229,"value":1379},{"type":224,"tag":316,"props":1729,"children":1730},{"style":346},[1731],{"type":229,"value":1384},{"type":224,"tag":316,"props":1733,"children":1734},{"style":335},[1735],{"type":229,"value":1389},{"type":224,"tag":316,"props":1737,"children":1738},{"style":329},[1739],{"type":229,"value":444},{"type":224,"tag":316,"props":1741,"children":1742},{"style":329},[1743],{"type":229,"value":1398},{"type":224,"tag":316,"props":1745,"children":1746},{"style":329},[1747],{"type":229,"value":1403},{"type":224,"tag":316,"props":1749,"children":1750},{"style":346},[1751],{"type":229,"value":1408},{"type":224,"tag":316,"props":1753,"children":1754},{"style":329},[1755],{"type":229,"value":364},{"type":224,"tag":316,"props":1757,"children":1758},{"style":329},[1759],{"type":229,"value":369},{"type":224,"tag":316,"props":1761,"children":1762},{"class":318,"line":372},[1763,1767,1771,1775],{"type":224,"tag":316,"props":1764,"children":1765},{"style":323},[1766],{"type":229,"value":1424},{"type":224,"tag":316,"props":1768,"children":1769},{"style":329},[1770],{"type":229,"value":332},{"type":224,"tag":316,"props":1772,"children":1773},{"style":335},[1774],{"type":229,"value":1043},{"type":224,"tag":316,"props":1776,"children":1777},{"style":329},[1778],{"type":229,"value":1437},{"type":224,"tag":316,"props":1780,"children":1781},{"class":318,"line":381},[1782,1786,1790,1794,1798,1802,1806,1810],{"type":224,"tag":316,"props":1783,"children":1784},{"style":329},[1785],{"type":229,"value":1445},{"type":224,"tag":316,"props":1787,"children":1788},{"style":335},[1789],{"type":229,"value":338},{"type":224,"tag":316,"props":1791,"children":1792},{"style":329},[1793],{"type":229,"value":343},{"type":224,"tag":316,"props":1795,"children":1796},{"style":346},[1797],{"type":229,"value":1458},{"type":224,"tag":316,"props":1799,"children":1800},{"style":329},[1801],{"type":229,"value":354},{"type":224,"tag":316,"props":1803,"children":1804},{"style":346},[1805],{"type":229,"value":359},{"type":224,"tag":316,"props":1807,"children":1808},{"style":329},[1809],{"type":229,"value":364},{"type":224,"tag":316,"props":1811,"children":1812},{"style":329},[1813],{"type":229,"value":369},{"type":224,"tag":316,"props":1815,"children":1816},{"class":318,"line":419},[1817],{"type":224,"tag":316,"props":1818,"children":1819},{"style":329},[1820],{"type":229,"value":828},{"type":224,"tag":316,"props":1822,"children":1823},{"class":318,"line":456},[1824,1828,1833,1837,1841,1845,1850],{"type":224,"tag":316,"props":1825,"children":1826},{"style":346},[1827],{"type":229,"value":1489},{"type":224,"tag":316,"props":1829,"children":1830},{"style":346},[1831],{"type":229,"value":1832}," settings",{"type":224,"tag":316,"props":1834,"children":1835},{"style":329},[1836],{"type":229,"value":397},{"type":224,"tag":316,"props":1838,"children":1839},{"style":323},[1840],{"type":229,"value":359},{"type":224,"tag":316,"props":1842,"children":1843},{"style":329},[1844],{"type":229,"value":332},{"type":224,"tag":316,"props":1846,"children":1847},{"style":335},[1848],{"type":229,"value":1849},"Build",{"type":224,"tag":316,"props":1851,"children":1852},{"style":329},[1853],{"type":229,"value":931},{"type":224,"tag":316,"props":1855,"children":1856},{"class":318,"line":534},[1857,1861,1866,1870,1874,1878,1882,1887,1891,1896,1900,1904,1909,1913,1918,1922],{"type":224,"tag":316,"props":1858,"children":1859},{"style":346},[1860],{"type":229,"value":1489},{"type":224,"tag":316,"props":1862,"children":1863},{"style":346},[1864],{"type":229,"value":1865}," appConfigurationConnectionUri",{"type":224,"tag":316,"props":1867,"children":1868},{"style":329},[1869],{"type":229,"value":397},{"type":224,"tag":316,"props":1871,"children":1872},{"style":329},[1873],{"type":229,"value":1503},{"type":224,"tag":316,"props":1875,"children":1876},{"style":346},[1877],{"type":229,"value":1508},{"type":224,"tag":316,"props":1879,"children":1880},{"style":329},[1881],{"type":229,"value":444},{"type":224,"tag":316,"props":1883,"children":1884},{"style":323},[1885],{"type":229,"value":1886},"settings",{"type":224,"tag":316,"props":1888,"children":1889},{"style":329},[1890],{"type":229,"value":332},{"type":224,"tag":316,"props":1892,"children":1893},{"style":335},[1894],{"type":229,"value":1895},"GetValue",{"type":224,"tag":316,"props":1897,"children":1898},{"style":329},[1899],{"type":229,"value":1652},{"type":224,"tag":316,"props":1901,"children":1902},{"style":329},[1903],{"type":229,"value":1398},{"type":224,"tag":316,"props":1905,"children":1906},{"style":329},[1907],{"type":229,"value":1908},">(",{"type":224,"tag":316,"props":1910,"children":1911},{"style":329},[1912],{"type":229,"value":480},{"type":224,"tag":316,"props":1914,"children":1915},{"style":483},[1916],{"type":229,"value":1917},"Endpoints:AppConfig",{"type":224,"tag":316,"props":1919,"children":1920},{"style":329},[1921],{"type":229,"value":480},{"type":224,"tag":316,"props":1923,"children":1924},{"style":329},[1925],{"type":229,"value":787},{"type":224,"tag":316,"props":1927,"children":1928},{"class":318,"line":631},[1929,1933,1937,1942,1946,1951],{"type":224,"tag":316,"props":1930,"children":1931},{"style":323},[1932],{"type":229,"value":837},{"type":224,"tag":316,"props":1934,"children":1935},{"style":329},[1936],{"type":229,"value":332},{"type":224,"tag":316,"props":1938,"children":1939},{"style":335},[1940],{"type":229,"value":1941},"AddAzureAppConfiguration",{"type":224,"tag":316,"props":1943,"children":1944},{"style":329},[1945],{"type":229,"value":444},{"type":224,"tag":316,"props":1947,"children":1948},{"style":346},[1949],{"type":229,"value":1950},"options",{"type":224,"tag":316,"props":1952,"children":1953},{"style":329},[1954],{"type":229,"value":369},{"type":224,"tag":316,"props":1956,"children":1957},{"class":318,"line":717},[1958],{"type":224,"tag":316,"props":1959,"children":1960},{"style":329},[1961],{"type":229,"value":1962},"            {\n",{"type":224,"tag":316,"props":1964,"children":1965},{"class":318,"line":726},[1966,1971,1975,1980,1984,1989,1993,1997,2001],{"type":224,"tag":316,"props":1967,"children":1968},{"style":323},[1969],{"type":229,"value":1970},"                options",{"type":224,"tag":316,"props":1972,"children":1973},{"style":329},[1974],{"type":229,"value":332},{"type":224,"tag":316,"props":1976,"children":1977},{"style":335},[1978],{"type":229,"value":1979},"Connect",{"type":224,"tag":316,"props":1981,"children":1982},{"style":329},[1983],{"type":229,"value":444},{"type":224,"tag":316,"props":1985,"children":1986},{"style":323},[1987],{"type":229,"value":1988},"appConfigurationConnectionUri",{"type":224,"tag":316,"props":1990,"children":1991},{"style":329},[1992],{"type":229,"value":354},{"type":224,"tag":316,"props":1994,"children":1995},{"style":329},[1996],{"type":229,"value":1503},{"type":224,"tag":316,"props":1998,"children":1999},{"style":346},[2000],{"type":229,"value":1585},{"type":224,"tag":316,"props":2002,"children":2003},{"style":329},[2004],{"type":229,"value":1590},{"type":224,"tag":316,"props":2006,"children":2007},{"class":318,"line":790},[2008],{"type":224,"tag":316,"props":2009,"children":2010},{"style":329},[2011],{"type":229,"value":2012},"            });\n",{"type":224,"tag":316,"props":2014,"children":2015},{"class":318,"line":822},[2016],{"type":224,"tag":316,"props":2017,"children":2018},{"style":329},[2019],{"type":229,"value":1598},{"type":224,"tag":316,"props":2021,"children":2022},{"class":318,"line":831},[2023,2027,2031,2035,2039],{"type":224,"tag":316,"props":2024,"children":2025},{"style":329},[2026],{"type":229,"value":1445},{"type":224,"tag":316,"props":2028,"children":2029},{"style":335},[2030],{"type":229,"value":1610},{"type":224,"tag":316,"props":2032,"children":2033},{"style":329},[2034],{"type":229,"value":444},{"type":224,"tag":316,"props":2036,"children":2037},{"style":346},[2038],{"type":229,"value":1619},{"type":224,"tag":316,"props":2040,"children":2041},{"style":329},[2042],{"type":229,"value":369},{"type":224,"tag":316,"props":2044,"children":2045},{"class":318,"line":894},[2046],{"type":224,"tag":316,"props":2047,"children":2048},{"style":329},[2049],{"type":229,"value":828},{"type":224,"tag":316,"props":2051,"children":2052},{"class":318,"line":903},[2053,2057,2061,2065,2069,2073],{"type":224,"tag":316,"props":2054,"children":2055},{"style":323},[2056],{"type":229,"value":1638},{"type":224,"tag":316,"props":2058,"children":2059},{"style":329},[2060],{"type":229,"value":332},{"type":224,"tag":316,"props":2062,"children":2063},{"style":335},[2064],{"type":229,"value":1647},{"type":224,"tag":316,"props":2066,"children":2067},{"style":329},[2068],{"type":229,"value":1652},{"type":224,"tag":316,"props":2070,"children":2071},{"style":346},[2072],{"type":229,"value":1657},{"type":224,"tag":316,"props":2074,"children":2075},{"style":329},[2076],{"type":229,"value":1662},{"type":224,"tag":316,"props":2078,"children":2079},{"class":318,"line":912},[2080],{"type":224,"tag":316,"props":2081,"children":2082},{"style":329},[2083],{"type":229,"value":1670},{"type":224,"tag":243,"props":2085,"children":2087},{"id":2086},"which-configuration-provider-can-help-me-to-use-ab-testing-and-feature-flags-in-my-code",[2088],{"type":229,"value":2089},"Which configuration provider can help me to use A/B testing and feature flags in my code?",{"type":224,"tag":225,"props":2091,"children":2092},{},[2093,2098],{"type":224,"tag":232,"props":2094,"children":2096},{"href":1689,"rel":2095},[236],[2097],{"type":229,"value":1693},{"type":229,"value":2099}," is also the configuration provider to use when you want to use A/B testing or feature flags.\nThere are probably other configuration providers that allow you to do that but this is the one I know.",{"type":224,"tag":243,"props":2101,"children":2103},{"id":2102},"what-is-the-point-of-using-the-launchsettingsjson-file",[2104,2106,2112],{"type":229,"value":2105},"What is the point of using the ",{"type":224,"tag":297,"props":2107,"children":2109},{"className":2108},[],[2110],{"type":229,"value":2111},"launchsettings.json",{"type":229,"value":2113}," file?",{"type":224,"tag":225,"props":2115,"children":2116},{},[2117,2119,2124,2126,2131,2133,2138,2140,2146,2148,2153,2155,2160],{"type":229,"value":2118},"Unlike the ",{"type":224,"tag":297,"props":2120,"children":2122},{"className":2121},[],[2123],{"type":229,"value":1256},{"type":229,"value":2125}," files, the ",{"type":224,"tag":297,"props":2127,"children":2129},{"className":2128},[],[2130],{"type":229,"value":2111},{"type":229,"value":2132}," file is not used when you build and deploy your application somewhere. It is only useful to debug your application code locally. The tools you use to run your application on your local machine (your IDE or the .NET Core CLI) will use the settings in this file to provide configuration to your apps through environments variables or command line arguments. By default, this file will set the ",{"type":224,"tag":297,"props":2134,"children":2136},{"className":2135},[],[2137],{"type":229,"value":1264},{"type":229,"value":2139}," environment variable (or ",{"type":224,"tag":297,"props":2141,"children":2143},{"className":2142},[],[2144],{"type":229,"value":2145},"DOTNET_ENVIRONMENT",{"type":229,"value":2147}," depending on whether your application is an ASP.NET Core application or not) to ",{"type":224,"tag":297,"props":2149,"children":2151},{"className":2150},[],[2152],{"type":229,"value":214},{"type":229,"value":2154}," so that you debug your code with the ",{"type":224,"tag":297,"props":2156,"children":2158},{"className":2157},[],[2159],{"type":229,"value":214},{"type":229,"value":2161}," configuration",{"type":224,"tag":225,"props":2163,"children":2164},{},[2165],{"type":224,"tag":263,"props":2166,"children":2170},{"alt":2167,"className":2168,"src":2169},"Example of a launchsettings.json file.",[267,268],"/posts/images/lostinconfiguration_launchsettings_1.png",[],{"type":224,"tag":1161,"props":2172,"children":2173},{"icon":1163},[2174],{"type":224,"tag":225,"props":2175,"children":2176},{},[2177,2179,2184,2186,2192,2194,2200],{"type":229,"value":2178},"You can define multiple profiles in the ",{"type":224,"tag":297,"props":2180,"children":2182},{"className":2181},[],[2183],{"type":229,"value":2111},{"type":229,"value":2185}," file to be able to run your application with multiple configurations. It can be interesting to create a ",{"type":224,"tag":297,"props":2187,"children":2189},{"className":2188},[],[2190],{"type":229,"value":2191},"Staging profile",{"type":229,"value":2193}," to debug your application with the ",{"type":224,"tag":297,"props":2195,"children":2197},{"className":2196},[],[2198],{"type":229,"value":2199},"Staging",{"type":229,"value":2201}," configuration; for instance to reproduce a bug that only happens in Staging environment.",{"type":224,"tag":243,"props":2203,"children":2205},{"id":2204},"lets-recap",[2206],{"type":229,"value":2207},"Let's recap.",{"type":224,"tag":225,"props":2209,"children":2210},{},[2211],{"type":229,"value":2212},"To know where to put your settings in an ASP.NET Core project you have to ask yourself some questions: is this setting secret or not, does its value depends on the environment, will it be shared with other applications... ?",{"type":224,"tag":225,"props":2214,"children":2215},{},[2216],{"type":229,"value":2217},"My point of view about how to handle the configuration in an ASP.NET Core project is the following:",{"type":224,"tag":2219,"props":2220,"children":2221},"ul",{},[2222,2235,2248,2253,2265,2277],{"type":224,"tag":2223,"props":2224,"children":2225},"li",{},[2226,2228,2233],{"type":229,"value":2227},"put all your settings in the ",{"type":224,"tag":297,"props":2229,"children":2231},{"className":2230},[],[2232],{"type":229,"value":486},{"type":229,"value":2234}," file (without necessarily putting the values of the settings) to have a global view of the configuration used by your application",{"type":224,"tag":2223,"props":2236,"children":2237},{},[2238,2240,2246],{"type":229,"value":2239},"keep a ",{"type":224,"tag":297,"props":2241,"children":2243},{"className":2242},[],[2244],{"type":229,"value":2245},"appsettings.{EnvironmentName}.json",{"type":229,"value":2247}," file by environment in your project with only the settings that are dependent on the environment",{"type":224,"tag":2223,"props":2249,"children":2250},{},[2251],{"type":229,"value":2252},"never store secrets in source code and use an Azure Key Vault to store the settings that are secrets",{"type":224,"tag":2223,"props":2254,"children":2255},{},[2256,2258,2263],{"type":229,"value":2257},"create different profiles in your ",{"type":224,"tag":297,"props":2259,"children":2261},{"className":2260},[],[2262],{"type":229,"value":2111},{"type":229,"value":2264},"file to debug your application locally with different configurations",{"type":224,"tag":2223,"props":2266,"children":2267},{},[2268,2270,2275],{"type":229,"value":2269},"use environment variables (through ",{"type":224,"tag":297,"props":2271,"children":2273},{"className":2272},[],[2274],{"type":229,"value":2111},{"type":229,"value":2276}," locally and application settings in Azure) to override settings previously defined in other configuration sources",{"type":224,"tag":2223,"props":2278,"children":2279},{},[2280],{"type":229,"value":2281},"think about Azure App Configuration if you need to share some settings among different applications",{"type":224,"tag":225,"props":2283,"children":2284},{},[2285],{"type":229,"value":2286},"I hope this article has answered some of your questions about configuration ASP.NET Core and that you feel less lost now. Have fun with configuration providers!",{"type":224,"tag":2288,"props":2289,"children":2290},"style",{},[2291],{"type":229,"value":2292},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":207,"searchDepth":372,"depth":372,"links":2294},[2295,2296,2297,2298,2299,2300,2301,2302,2303,2305],{"id":245,"depth":372,"text":248},{"id":273,"depth":372,"text":276},{"id":1113,"depth":372,"text":1116},{"id":1188,"depth":372,"text":1191},{"id":1213,"depth":372,"text":1216},{"id":1293,"depth":372,"text":1296},{"id":1678,"depth":372,"text":1681},{"id":2086,"depth":372,"text":2089},{"id":2102,"depth":372,"text":2304},"What is the point of using the launchsettings.json file?",{"id":2204,"depth":372,"text":2207},"markdown","content:1.posts:24.lost-in-configuration.md","content","1.posts/24.lost-in-configuration.md","md",[2312,2327],{"_path":82,"_dir":205,"_draft":206,"_partial":206,"_locale":207,"title":81,"description":2313,"lead":2314,"date":2315,"image":2316,"badge":2318,"tags":2320,"_type":2306,"_id":2325,"_source":2308,"_file":2326,"_extension":2310},"This week is mainly about learning Azure tooling.","Azure emulators, Use my current account Edge extension, Azure icons in Visio, and Azure Charts.","2021-10-04T00:00:00.000Z",{"src":2317},"/images/surface_1.jpg",{"label":2319},"Tips",[2321,219,2322,2323,2324],"tips learned this week","Azure Storage","Azure SignalR","Visio","content:1.posts:25.w39-2021-tips-learned-this-week.md","1.posts/25.w39-2021-tips-learned-this-week.md",{"_path":76,"_dir":205,"_draft":206,"_partial":206,"_locale":207,"title":75,"description":2328,"date":2329,"image":2330,"badge":2332,"tags":2334,"_type":2306,"_id":2339,"_source":2308,"_file":2340,"_extension":2310},"If you are using Azure Functions chances are you are using the setting AzureWebJobsStorage in your Function App configuration. And it is quite likely that the value of this setting which is a secret is stored in a non-secured way directly in your Function App configuration, available to anyone who has access to this configuration. But do not worry, we will see in this article how we can make your Function App more secure by removing this secret.","2021-09-15T00:00:00.000Z",{"src":2331},"/images/lightning_2.jpg",{"label":2333},"DevOps",[2335,2336,2337,2338,219],"Azure Functions","Pulumi","IaC","Azure Active Directory","content:1.posts:23.azure-functions-without-azurewebjobsstorage.md","1.posts/23.azure-functions-without-azurewebjobsstorage.md",1716749601620]