Reputation: 25
i have some settings in host.json file. I know that is globla settings for function app. I can get it on local but in production.
In local, i have this work
var maxDequeueCount=config.GetSection("extensions:queues:maxDequeueCount").Value;
Anyone tell me how to read setting from host.json file?
Thank you
var maxDequeueCount=config.GetSection("extensions:queues:maxDequeueCount").Value;
Upvotes: 1
Views: 2333
Reputation: 2938
This works for me:
var config = builder.GetContext().Configuration;
string maxAutoRenewDuration = config.GetSection("AzureFunctionsJobHost:extensions:serviceBus:messageHandlerOptions:maxAutoRenewDuration").Value;
Upvotes: 1
Reputation: 1811
The host.json metadata file contains global configuration options that affect all functions for a function app.
Other function app configuration options are managed in your app settings.
Settings in the local.settings.json file are only used by Functions tools when running locally
Regarding your query : You could config it in your appsettings blade of the azure function
Upvotes: 0