How and where to define an environment variable on Azure

后端 未结 6 2285
臣服心动
臣服心动 2020-11-27 15:38

I have an ASP.NET MVC web application deployed to Azure. I\'m reading my setting using the GetEnvironmentVariable(...) method.

The problem is that I can

6条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-27 16:09

    I know OP specified in the portal, but command line is more repeatable. To do it using Azure CLI:

    az webapp config appsettings set -n $webappname -g $resourceGroupName --settings ConnectionStrings__Default=$connectionString

    To set an environment variable ConnectionStrings__Default to the variable $connectionString

提交回复
热议问题