Thomas
Thomas

Reputation: 1851

Azure Function Failed to disable function

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

Upvotes: 2

Views: 1960

Answers (3)

amruta kallimath
amruta kallimath

Reputation: 1

Please add a property in the function app configuration section AzureWebJobs.[functionAppName].Disabled as true

Upvotes: 0

thehappycheese
thehappycheese

Reputation: 353

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'.

Upvotes: 0

Thomas
Thomas

Reputation: 1851

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.

Upvotes: 3

Related Questions