Node JS Deployment to Azure Web App Service ERROR - “You do not have permission to view this directory or page.”

纵饮孤独 提交于 2021-02-11 14:54:09

问题


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


回答1:


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.

  1. Create a web app.

  1. Use continuous deployment.

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

  1. View deployment status.

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.



来源:https://stackoverflow.com/questions/64071999/node-js-deployment-to-azure-web-app-service-error-you-do-not-have-permission

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!