4

Do I have to set WEBSITE_CONTENTSHARE value in app settings when having multiple deployment slots? What does this value indicate? Can I provide some random values for WEBSITE_CONTENTSHARE in production and aging slots?

user989988
  • 3,006
  • 7
  • 44
  • 91

1 Answers1

1

WEBSITE_CONTENTSHARE is used along with WEBSITE_CONTENTAZUREFILECONNECTIONSTRING which represents where the configurations are stored and the storage account where the function app code is stored.

Do I have to set WEBSITE_CONTENTSHARE value in app settings when having multiple deployment slots?

You do not need to set the WEBSITE_CONTENTSHARE setting in a deployment slot. This setting is generated for you when the app is created in the deployment slot.

What does this value indicate?

This represents the file path to the function app code and configuration.

Can I provide some random values for WEBSITE_CONTENTSHARE in production and aging slots?

According to this document "The WEBSITE_CONTENTSHARE setting must be provided and valid at creation time. An automated deployment that doesn't contain these settings results in a function app that won't run, even if the settings are added later."

NOTE:

  • This is available when deploying to a Windows or Linux Premium plan and Windows Consumption plan.

  • This is not supported in Linux Consumption plans and Windows and Linux Dedicated plans.

  • If you change or remove this option, your function app may not start.

REFERENCES:

  1. App settings reference for Azure Functions
  2. WEBSITE_CONTENTSHARE should not be used accroding to support
  3. Troubleshoot error: Azure Functions Runtime is unreachable
SwethaKandikonda
  • 7,513
  • 2
  • 4
  • 18
  • Fyi, when the function host's underlying storage account (AzureWebJobsStorage) network access is restricted, you _[do](https://learn.microsoft.com/en-us/azure/azure-functions/functions-app-settings#:~:text=There%20are%20scenarios%20where%20you%20must%20set%20the%20WEBSITE_CONTENTSHARE%20value%20to%20a%20predefined%20share)_ need to explicitly provide an existing share name in the deployment template. – baouss May 20 '22 at 08:42
  • Hi I ran into this issue recently. We have been on the Premium plan for long time without setting WEBSITE_CONTENTSHARE or WEBSITE_CONTENTAZUREFILECONNECTIONSTRING and no issues. But a recent new app can not run after deploying to Azure. Do you have any insights? I am not sure why this is happening now – Daisy QL Mar 10 '23 at 02:58