cITsecure
cITsecure

Reputation: 164

Deployment to AppService doesn't recognize environment variables

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

Answers (1)

Jeff Freedman
Jeff Freedman

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.

Click here to find where the configuration tab is located at in an Azure App Service

Upvotes: 3

Related Questions