0

我将 Azure 从 2.0 升级到 2.2。在此之后,Microsoft.WindowsAzure.CloudConfigurationManager.GetSetting("...") 总是返回空字符串。此代码在 2.0 版中运行良好。

我的解决方案确实有 nuGet,并且我已经从这里获得了最新版本的 windowsazure.configurationManager。我的解决方案有一个 WebRole 和一个 WorkerRole。WebRole 是我关心的一个,它有以下 ddl 版本:

Microsoft.WindowsAzure.Configuration 2.0.0.0
Microsoft.WindowsAzure.Diagnostics 2.2.0.0
Microsoft.WindowsAzure.ServiceRuntime 2.2.0.0
Microsoft.WindowsAzure.Storage 3.0.2.0
4

2 回答 2

1

Duplicate your ServiceConfig settings in the web.config appSettings section and then you can run in the emulator or just debug the web role. GetSetting trys ServiceConfig first then looks in the web.config appSettings.

于 2014-01-13T17:01:38.017 回答
0

原来我没有将 Azure 项目作为启动项目!但是,我之前遇到过这个问题,它在 Azure 中运行。

不知道它是如何排序的!

于 2014-01-13T16:41:25.973 回答