Azure 配置设置和 Microsoft.WindowsAzure.CloudConfigurationManager [英] Azure configuration settings and Microsoft.WindowsAzure.CloudConfigurationManager

查看:17
本文介绍了Azure 配置设置和 Microsoft.WindowsAzure.CloudConfigurationManager的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

显然 Microsoft.WindowsAzure.CloudConfigurationManager.GetSettings 将首先查看 ServiceConfiguration.*.cscfg 然后回退到 web.config 和 app.config.

Apparently Microsoft.WindowsAzure.CloudConfigurationManager.GetSettings will start by looking in ServiceConfiguration.*.cscfg and then fall back to web.config and app.config.

但是 - 这在 web/app .config 中应该是什么格式?

But - what format should this be in web/app .config?

例如让 Microsoft.WindowsAzure.CloudConfigurationManager.GetSettings("Foo") 从 app.config 中获取 XML 是什么样的?

E.g. to get Microsoft.WindowsAzure.CloudConfigurationManager.GetSettings("Foo") to pick up from app.config what would the XML look like?

推荐答案

这只是一个 appSettings 键/值.

<configuration>
  <appSettings>
    <add key="Foo" value="AzureSetting"/>
  </appSettings>
</configuration>

这篇关于Azure 配置设置和 Microsoft.WindowsAzure.CloudConfigurationManager的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆