Reputation: 164
I have my dotnet core API deployed to Azure AppService. When it runs in debug mode locally, I am getting the environment variables from local.settings.json/debug and it works fine. I get the connection string there and a few more items. After I deploy to AppService the application is not able to load the environment variables. I even try to put them in appsettings still it doesn't pick them up. Anyone can assist with this issue?
Thanks.
Upvotes: 3
Views: 1060
Reputation: 66
Did you remember to add the environment variables to the configuration tab in the Azure App Service? The local.settings.json
file only houses environment variables only when you run the application locally.
Upvotes: 3