0

The Portal tells me for the function.json.

your app is currently in read only mode because you are running from a package file. To make any changes update the content in your zip file and `WEBSITE_RUN_FROM_PACKAGE` app setting.

I have tried to add a correct function.json to the project folder in VS code

set 0 for WEBSITE_RUN_FROM_PACKAGE

and then redeployed. Also tried to delete WEBSITE_RUN_FROM_PACKAGE and then redeploy didn't work as WEBSITE_RUN_FROM_PACKAGE is always recreated with setting to 1

How could I correctly tailor my local c# project so that I can control bindings ?

user3732793
  • 1,699
  • 4
  • 24
  • 53
  • Does this answer your question? [What is going wrong with web deployment from Visual Studio and App service?](https://stackoverflow.com/questions/51700538/what-is-going-wrong-with-web-deployment-from-visual-studio-and-app-service) –  Aug 31 '22 at 23:47
  • No. As Mentioned I have tried already what is mentioned there and the question is how would I do that on the developer machine side as I don't like to manually do something for numerous functions – user3732793 Sep 01 '22 at 06:19
  • Did you tried the unchecking the `Run from package` option in publish window of the Visual Studio IDE and publish the functions? –  Sep 01 '22 at 06:22
  • I have only visual studio code. Also they mentioned an azure portal configuration for each function not a common setting – user3732793 Sep 01 '22 at 06:24
  • If its VS Code, try setting up that setting to 1 in Azure Portal Function App Configuration using [portal or Cloud Shell cmdlets](https://learn.microsoft.com/en-us/azure/azure-functions/run-functions-from-deployment-package#adding-the-website_run_from_package-setting) –  Sep 01 '22 at 06:47
  • Thanks for trying to help but as mentioned I tried all mentioned there, including trying setting the url which didn't work. Also that setting is automatically set after every redeploy to 1 which prevents any change to function.json – user3732793 Sep 01 '22 at 07:32
  • Please correct me if my understanding is wrong. You have more than 1 individual function in the Project and set Website Run From Package setting to 1 before publishing and after multiple times publishing also, you're getting the same notification in the portal function app i.e., `your app is currently in read only mode because ...`! Is this the scenario! –  Sep 01 '22 at 09:13

1 Answers1

0

For those passing by.

The function app did work on my desk but failed with those errors and more in azure.

The solution was actually to change to premium function as this allows the libraries inside the function to work. So no tailoring to function.json was needed at all.

All a bit missleading and confusing

user3732793
  • 1,699
  • 4
  • 24
  • 53