'Cannot deploy Node js app to Azure ("do not have permission")
I have a Wordle-esque app that I want to deploy using Azure. Repo here. It is a fork from a popular open-source project, and I can also locally build and run the game. Locally, it runs perfectly.
I am trying to use Azure App Services to deploy it, using a Github Action. All the Actions pass, and the App can be successfully built. However, when I try to view the deployment here the only error I am receiving is
You do not have permission to view this directory or page.
Since it runs locally, and it pass its github action build, I do not know how to proceed here. I have tried restarting the app, and changing the resources I am using to host it, but that does not work. Some other answers seem to suggest the problem is about it not finding index.html, but I can access that through https://shetland-wordle.azurewebsites.net/public/index.html and the page is blank.
If i look under wwwroot/ in the Azure debugger I see the following file structure:
Any help would be appreciated
Solution 1:[1]
You do not have permission to view this directory or page.
- We can set a default page to a Windows Azure Web App.
- In
web.config, specify the default page within theSystem.WebServersection. - If you do not have
web.config, create one in azure portal=>your web app => Advanced Tools =>Go => Debug Console => CMD=>site=> wwwroot folder.
<system.webServer>
<defaultDocument>
<files>
<clear/>
<add value="index.html"/>
</files>
</defaultDocument>
<system.webServer>
Your index.html will be respected as the default document of the web site, and therefore will be served when the client requests for the root URL.
OR
- If the files show up under /wwwroot/your-app-folder/ you may get this permission issue.
- Make sure your
index.htmlis underwwwrootfolder - Add the default document in the project root folder and set it as default page in appsetting on the Azure portal and save the setting.
The default document is the web page that is displayed at the root URL for a website.

Navigate to
KUDUurl:https://<your app name>.scm.azurewebsites.net/DebugConsoleand go tosite\wwwrootto check if the files are contained within a directory.If you find any files missing , re-deploy the app.
Please refer similar issues S1 , S2 and S3 for more information.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | HarshithaVeeramalla-MT |

