409 Conflict: Could not write to local resource 'D:\home\site\wwwroot\ due to error'Could not find file 'D:\home\site\wwwroot\

409 Conflict: Could not write to local resource 'D:\home\site\wwwroot\ due to error 'Could not find file 'D:\home\site\wwwroot\

Issue:

·       409 Conflict: Could not write to local resources:\home\site\wwwroot\' due to error 'Invalid access to memory location.

·       409 Conflict: Cannot delete directory. It is either not empty or access is not allowed.



Solution:

Reason for all these errors is, APP SETTING KEY

WEBSITE_RUN_FROM_PACKAGE = 1

This setting makes wwwroot as a read-only file system.

With Run From Package, this is strictly enforced as the wwwroot folder becomes read-only

Please check the article for more details: 

Removing the key will bring back everything to work as expected but then you would not be able to utilize the benefits of WEBSITE_RUN_FROM_PACKAGE

If even after removing this setting your files still appears in read-only mode then it can be the read-only attributes of file which is preventing you to edit file.
You can check the permission of any file using below command,
attrib FileName 
e.g. attrib index.html
More information on below URL,

If all these steps doesn't resolve your issue then you can check below URL to understand how to deal with locked file in Azure App Service,
https://github.com/projectkudu/kudu/wiki/Dealing-with-locked-files-during-deployment


Other useful references,



Issue: Azure Functions: The Consumption pricing tier is not allowed in this resource group


Issue: Azure function is throwing one of the following exception

·       Unable to retrieve Functions Keys

·       We are not able to retrieve the keys for function

·       The function runtime is unable to start.

·       Function host is not running.

·       Internal Server error.

·       Service Unavailable.


Issue: Disable Azure functions



6 comments:

  1. Thank. This solved my issue

    ReplyDelete
  2. Thanks! Solved our issue, I'm not sure how that application setting got added to our Azure app service but it caused a lot of issues for us.

    ReplyDelete
  3. In my case its the App Service's file system quota ran out of space.

    https://docs.microsoft.com/answers/questions/11814/error-failed-to-upload-file-sitewwwrootapp-offline.html?childToView=11800#answer-11800

    ReplyDelete
    Replies
    1. Thanks for sharing your analysis. It will help others also

      Delete
  4. Does it really work. I am deleting the WEBSITE_RUN_FROM_PACKAGE from Configuration of my Function app and it is deleting the deployed function itself. Is there any workaround.

    My Function app reads the container file and create a zip and upload the zip file to another container. Locally it runs fine but on portal it is showing error The access to the "zip path" is denied.

    ReplyDelete