How and where to define an environment variable on Azure

后端 未结 6 2275
臣服心动
臣服心动 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:04

    I assume you are using Azure App Service (formerly known as Azure Websites).

    To define your own environment variable, click to your site → All SettingsApplication settings:

    Add an app setting in the "App settings" section:

    You can verify the value from the debug console.

    Going to https://{your site name}.scm.azurewebsites.net/DebugConsole:

提交回复
热议问题