0

I've been following this tutorial on how to deploy a NodeJS app to Azure:

https://www.youtube.com/watch?v=RWdxkhajCg0&fbclid=IwAR10Q6x8PbqLDAZZzzMX9Nvp_jEGiN_Ts4V8XLJbzF6xreq6_MB_vsbIqx8

Firstly, I did everything exactly the same way as the author showed and it all worked. In the video, they're using Linux Web App Service. Since I have to get familiar with the Windows App Services (that's what I am required to learn and use for my job), I decided to deploy exactly same app to the Windows Web App service. However, instead of the home page, I only saw "You do not have permission to view this directory or page.".

I've already read bunch of solutions online, people suggest adding a web.config file, but it didn't help no matter what I added to that. The app is not supposed to limit any ip addresses/user groups as it's supposed to be a newly deployed app with no access restrictions (just as in the tutorial).

The only hint that I found out is that on Linux it works, on Windows it doesn't.

The app code is here:

https://github.com/Aitemir/MSP005

Aiti
  • 1
  • 2
  • i had a similar issue which i posted earlier. look at it here - https://stackoverflow.com/questions/63872925/react-js-azure-devops-web-app-wont-run-but-files-are-present-in-server-and-no-er . the app is react, but the issue was node JS. – Jay Sep 26 '20 at 09:32
  • also, put your YAML file here if you are using devops. – Jay Sep 26 '20 at 09:33
  • If my solution helps you, could you please mark my answer as [accepted](https://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work), tks~ – Jason Pan Sep 28 '20 at 06:22
  • Has your problem been solved? Is there any progress? – Jason Pan Sep 29 '20 at 08:44

1 Answers1

0

Because you uploaded the code to GitHub, my answer will help you very well. Jay's solution should also be effective, but he uses DevOps. If you are interested, you can also study.

Using Github to deploy web app will be very convenient.

Steps to solve my problem:

  1. Download your source code and upload it to my Github.

enter image description here

  1. Create a web app.

enter image description here

  1. Use continuous deployment.

enter image description here

  1. Delete .yml file. Delete all file in this folder.

enter image description here

  1. View deployment status.

enter image description here

enter image description here

When you follow my way, you will successfully deploy your application. You can also put the generated web.config file in the current application in kudu, which should solve your problem.

enter image description here

Jason Pan
  • 15,263
  • 1
  • 14
  • 29
  • For some reason this method never worked from me. It says "Failed to set up deployment". – Aiti Sep 29 '20 at 14:43
  • @Aiti This information is prompted when github is selected for deployment in the portal, and I often encounter this prompt. Suggestions, 1. Try a few more times 2. Create a new webapp for testing 3. Raise a support ticket on portal. – Jason Pan Sep 30 '20 at 00:56