0
votes

I was trying to create Azure Functions as provided in the help link - https://blogs.msdn.microsoft.com/webdev/2016/12/01/visual-studio-tools-for-azure-functions/

I am actually creating a Evenhub trigger to write the messages to blob storage.

When I try to run the project, I am getting an error:

"Microsoft.Azure.WebJobs.Host: Error indexing method 'Functions.DashPOCEventHub'. Microsoft.WindowsAzure.Storage: Value cannot be null."

I have put the correct values in the appsettings.json.

Can somebody help me with this error?

Also, when I try to publish the function to Azure, the appsettings.json is not being set correctly. I cannot see the values and keys when I go into the Azure UI application settings page.

2
Can you get it to run locally?Cloud SME

2 Answers

2
votes

appsettings.json won't create/override your web app ApplicationSettings when you deploy. You'll need to specify the ApplicationSettings for the web app explicitly.

The reason for this is so that you can use different secrets locally (appsettings.json) from what you deploy (web app appsettings).

There is more info on appsettings.json and web app Application Settings here.

0
votes

Silly John, did you update the Azure CLI when you run your Function Locally? Today is on the Azure Functions Console CLI 1.0.0-beta.97.

Probably, this update solves this issue.