Here is my scenario:
Problem: After deploying, always the first trigger to the azure function fails. It fails with the ConfigurationErrorsException exception which i am throwing if a appsetting is IsNullOrWhiteSpace. After about a minute after the first failed trigger, all the subsequent triggers start to be successful.
Is it that it takes time for appsettings to get loaded ? Have any of you faced such issue before ? What is the workaround/solution for this ?
You should not be using CloudConfigurationManager
in Azure App Service, as that component is designed for Cloud Services (a different Azure offering). You should avoid referencing that assembly entirely.
Instead, simply use ConfigurationManager.AppSettings["YourSetting"]
to access your app settings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With