How to fix "You do not have permission to view this directory or page." in Azure web app services

Teddy Anyanga 0 Reputation points
2024-07-06T11:55:38.9466667+00:00

I deployed my react app from a package file.

When I access the site from the default domain, I get this error "You do not have permission to view this directory or page."

I have accessed the kudu debug console, and these are the event logs that could help trace where the issue could be.

<Data>Failed to open siteversion.txt. ZipFS setup failed. Error: 0x80070003</Data>

<Data>Failed to copy zip from remote source.</Data>

<Data>Adding virtual directory from failure zip file \?\d:\local\SitePackages\89377609.zip</Data>

<Data>Failed to open zip file . Error: 0x80070003</Data>

<Data>AddVirtualWin32ZipDirectory failed. ZipFS setup failed. Error: 0x80070003</Data>

<Data>Adding virtual directory from failure zip file \?\d:\local\SitePackages\89383531.zip</Data>

<Data>Failed to open siteversion.txt. ZipFS setup failed. Error: 0x80070002</Data> This last error has been repeated 5 times towards the end of the event log.

When I open the wwwroot folder, all the files and folders seem to have been mounted correct,

Can anyone help me fix this?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,917 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Chong, Patrick 5 Reputation points
    2024-07-08T04:56:19.08+00:00

    Hi, you might have deployed the solution as a ZIP file but not extracted it. If you want to run the web app as a ZIP file, you can go to the Azure Web App settings and go to:

    1. Go to "Settings"
    2. Go to "Environment Variables"
    3. Add in a key called "WEBSITE_RUN_FROM_PACKAGE" and value set as "1".
    4. Save the changes.
    5. Restart the web app.

    Hopefully this helps.


Your answer

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