Reputation: 3874
Can you please tell me how does the configuration file work in Azure functions? Visual Studio creates a local.settings.json
file when creating an Azure function project but I guess that's local and cannot be deployed on Azure. Should I create an App.config
file and probably use CloudConfigurationManager to access the setting variables?
Upvotes: 5
Views: 6411
Reputation: 9881
You are correct, when developing locally, the configuration values are read from local.settings.json
.
However, when your function is running in Azure, the configuration values are read from App Settings.
So simply add an app setting and you can access it the same way you would access it if the function was running locally.
Upvotes: 6