Azure Function Failed to disable function

Viewed 587

I have some functions running in a Linux hosted Function App on a Consumption Plan. When I try to disable them through the Azure Portal some fail with an error [object Object].

enter image description here

Looking at the raw response in the browser dev tools indicates the error message is:

AppSetting with name 'AzureWebJobs.document-types.Disabled' is not allowed.

enter image description here

2 Answers

After debugging for a while it seems many of the other functions can be disabled without issue. In the end I discovered that renaming the function solves the problem. It appears that the portal does not like names containing dashes -. After renaming the function to documentTypes I'm able to disable it without errors.

I was experiencing a very similar (same?) error; turns out I needed to go to the Function App and Stop the whole app before disabling or deleting the Function.

Perhaps this happens because it was the the only function in the app, and I don't have deployment slots set up properly yet so it was in 'Production'.

Related