Azure does not override application settings

萝らか妹 提交于 2020-01-02 05:32:27

问题


In my Azure App Service I want to update application settings, but after publish from VS the keys doesn't override values from local Web.config

In Azure it looks like:

In the result my web.config on azure contains values from local settings

  <connectionStrings>
    <add name="MainConnectionString" connectionString="ConnectionStringToReplaceByAzure" providerName="System.Data.SqlClient" />
  </connectionStrings>
  <appSettings>
    <add key="MS_SigningKey" value="Overridden by portal settings" />
  </appSettings>

回答1:


Azure never physically modifies your web.config file. Instead, the Azure App Setting is injected into the config system at runtime. So even though you don't see it in web.config, if you query it from your app you will get the correct value.



来源:https://stackoverflow.com/questions/35869849/azure-does-not-override-application-settings

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!