CloudConfigurationManager vs WebConfigurationManager?

后端 未结 4 1415
-上瘾入骨i
-上瘾入骨i 2021-01-04 03:25

In an Azure Websites I was always using the following code to fetch some values from the config\'s app settings:

string property = WebConfigurationManager.         


        
4条回答
  •  庸人自扰
    2021-01-04 03:56

    WebConfigurationManager and CloudConfigurationManager manage different configuration files.

    WebConfigurationManager is for managing website's web.config file(s) and it's appsettings and connections strings

    CloudConfigurationManager is for managing .cscfg files (for cloud services). His benefit is that you can manage configurations and connections from the azure portal directly.

提交回复
热议问题