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

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

问题描述

显然<一href=\"http://msdn.microsoft.com/en-us/LIBRARY/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.

不过 - 这应该是在网站/应用程序的.config什么格式

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

例如。要获得 Microsoft.WindowsAzure.CloudConfigurationManager.GetSettings(富)从的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天全站免登陆