How and where to define an environment variable on Azure

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

    Actually this solves my problem (which I found yesterday - and it's on Scott Hanselman's blog also):

    Best practices for private config data and connection strings in configuration in ASP.NET and Azure

    TLDR;

    Put settings in a separate file that doesn't go to the repository and are not being deployed to the server. Next define missing variables in app settings like Xiaomin Wu showed.

提交回复
热议问题