I have developed simple Service Bus Trigger with CosmosDB Output with Visual Studio. Connection strings of Service Bus and CosmosDB are defined in local.settings.json. Code is fully function locally. Now I have Zip Published Function(C#) to Azure.
I'm getting Error:
Microsoft.Azure.WebJobs.Host: Error indexing method 'Function1'.
Microsoft.Azure.WebJobs.Host: Unable to resolve the value for property
'CosmosDBAttribute.ConnectionStringSetting'.
What should I do?
The error tells you need to add the settings on Azure.
azure function on azure is different from azure functions on local. on local the settings is in the local.settings.json. But on azure it is in the Configuration.(Even if you deploy the local.settings.json, the function will read env settings from Congfiguration)
And dont forget to save your edit.
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