Asp.net core mvc how to configure environment varibles and how to set db conectionstring based on staging or production.
how to write appsettiongjson
how to write launch setting json
Asp.net core mvc how to configure environment varibles and how to set db conectionstring based on staging or production.
how to write appsettiongjson
how to write launch setting json
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Vishal JoshiRank #377 · 6.7K reputationPosted Nov 8, 2022, 7:34 AM EST
Hello,
You can check the below link for environment variables to set a database connection for staging and production. Also how to write launchsetting.json, appsettiong.json file, etc.
https://www.c-sharpcorner.com/article/app-settings-file-according-to-environment-variable-dotnet-core-api/
Thanks
Naresh BeniwalRank #365 · 6.8K reputationPosted Nov 9, 2022, 4:33 AM EST
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/configuration/?view=aspnetcore-7.0