Share via

disable website_run_from_package in Azure Function App

Lairu Wu 0 Reputation points
2024-08-17T23:18:09.6533333+00:00

I have used Microsoft Visual Studio Code with Azure Tools extension to deploy serverless functions to Azure Function App, but after serveral deployments, I found that the app cannot run APIs well.

Azure Functions
Azure Functions

An Azure service that provides an event-driven serverless compute platform.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Amira Bedhiafi 41,386 Reputation points MVP Volunteer Moderator
    2026-05-07T10:14:04.8133333+00:00

    Hello Lairu !

    Thank you for posting on MS Learn Q&A.

    You need to remove the app setting from the function app and redeploy or restart.

    In the Azure portal, go to function app the settings tehn environment variables and under app settings, delete

    WEBSITE_RUN_FROM_PACKAGE then click apply and restart.

    If you prefer Azure CLI :

    az functionapp config appsettings delete \
      --name <function-app-name> \
      --resource-group <resource-group-name> \
      --setting-names WEBSITE_RUN_FROM_PACKAGE
    az functionapp restart \
      --name <function-app-name> \
      --resource-group <resource-group-name>
    

    Do not just set it to 0 because the supported values as 1 or a package url so the clean way to disable it is to remove the setting. Also when WEBSITE_RUN_FROM_PACKAGE is enabled, wwwroot becomes read only, so any function code that writes files under wwwroot can fail.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.