What is the standard structure to add keys to appsettings.json
?
Also, how to read those values in our run.csx
?
Normally in app.config, we had Con
Azure functions support only limited part of app.config
. It allows to save app settings and connections in local.settings.json
when running function from VS. It don't support WCF endpoint settings under system.serviceModel
in this json file. I had a dll library reference in Azure Function and that was internally calling WCF apis.
Strange thing I found is, when I run the Azure function, it converts back the json to xml config at the cli path (%localappdata%\AzureFunctionsTools\Releases\1.6.0\cli\func.exe.config
). I added my xml configuration hierarchy (system.serviceModel
) to this config file and it worked fine, picking my WCF endpoints to run the services. Though have struggled in using log4net configuration but am good to run the APIs.
Azure should have supported the xml config files directly.
Hope this helps.