On deploying an Azure function, I see the following exception in Application Insights:
I have the following in config setting:
The key vault contains the service bus connection string:
What am I missing?
On deploying an Azure function, I see the following exception in Application Insights:
I have the following in config setting:
The key vault contains the service bus connection string:
What am I missing?
Make sure any environment variable you read (like Environment.GetEnvironmentVariable("key")
) has value in Azure App Service settings.
Publish tab > hosting section > ... > Manage Azure App Service settings > check if any key doesn't have value
There are couple of things you can check :
These are very generic explanation for the problem statement as that doesn't provide more details. In case of functions many a times we see this error because if the connection string value is read from Azure Key Vault and you miss out on setting this value in the app settings of Azure Function configuration. In this scenario, an Access Policy created in the Key Vault configuration so that Azure Function application can read the values from the Key Vault. So you need to reverify the access policies to make sure the app settings values of the keys have valid values.