Share via

Azure function error after storage account upgrade: "System.Private.CoreLib: Access to the path 'C:\home\site\wwwroot\host.json' is denied."

BobB 5 Reputation points
2025-11-04T01:27:03.2166667+00:00

I created a new Azure Function with a new Azure Storage account. The storage account was apparently created as v1, because I saw a warning that I need to upgrade the storage account to v2 by Oct., 2026.

Right after that upgrade, my new Function now gives an error on the Overview tab: "System.Private.CoreLib: Access to the path 'C:\home\site\wwwroot\host.json' is denied."

All appears to be in place for the Function's access to the Storage account. The system-managed identity has both blob data contributor and blob data owner roles. This is my dev Function + Storage account. I also have those for test and prod which are functioning (storage was not upgraded).

I could recreate the Azure Function and its storage account, but it will only be putting off the problem. I'd rather fix it now before proceeding, so this is a stopper at the moment.

Your help is appreciated.

Azure Functions
Azure Functions

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


1 answer

Sort by: Most helpful
  1. BobB 5 Reputation points
    2025-11-04T01:41:12.1133333+00:00

    I found that adding WEBSITE_RUN_FROM_PACKAGE with value of 1 seems to have corrected the issue.

    This app setting was present in the other Functions which had Storage accounts which were not upgraded & were functioning.

    Was this answer helpful?

    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.