Azure: "You do not have permission to view this directory or page

前端 未结 7 2223
我寻月下人不归
我寻月下人不归 2021-01-04 23:37

I have created a node.js application in Visual Studio 2015 using the Azure SDK 2.7 and the Node.js Tools.

I have successfully set up CI with BitBucket in my web app

相关标签:
7条回答
  • 2021-01-05 00:03

    In my case, I got this error when using ZipDeploy: please be sure to compress files within the root folder, so that the Node.js files could be listed on Kudu at the a base level, instead of one folder more. Thanks to mike-urnun-msft.

    0 讨论(0)
  • 2021-01-05 00:11

    My situation is similar but slightly different. I was working on the Facebook Messenger Platform "Setting Up Your Webhook" documentation steps.

    localhost was working just fine, but upon deployment, it would simply say what others have noted.

    The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
    

    my final package.json looked like it, and it worked.

      "scripts": {
        "test": "echo \"Error: no test specified\" && exit 1",
        "start": "node index.js"
      },
    

    I think, the issue boils down to the way facebook provided the demo code. The demo code simply does not have everything needed to deploy specifically on azure.

    I have put my final code here (it can be used as a starter i think for another person who is running into deployment issues).

    Also, interestingly enough, others have suggested web.config, but I did not need it really.

    https://github.com/Jay-study-nildana/FBMessengerWebHook

    0 讨论(0)
  • 2021-01-05 00:13

    Edit: Try creating "Node JS Empty Web App" from the gallery at https://portal.azure.com and compare the web.config and the site with what you have. It's possible that you're missing some config settings.

    Previous answer: first off, only ports 80 and 443 are available in Azure Web Apps (the new name of Azure Websites). So port 1337 will not work. Reconfigure your app to run on port 80 or 443. Regarding the permission issue, do you have App Service Authentication enabled? Make sure that is disabled, by editing the Web App's application settings as below.

    0 讨论(0)
  • 2021-01-05 00:15

    You're probably missing the web.config file which is required if iisnode is used to run node processes behind iis or iis express.

    https://github.com/tjanczuk/iisnode/blob/master/src/samples/configuration/web.config

    0 讨论(0)
  • 2021-01-05 00:18

    Also when you deploy the zip file via the azurewebsites.net/ZipDeployUI, make sure that you see the files being unzipped on the /wwwroot level.

    If the files show up under /wwwroot/your-app-folder/ you may get this permission issue. I took a long time to figure this out! Hope it helps.

    0 讨论(0)
  • 2021-01-05 00:21

    You can try to create a instance of "Node JS Empty Web App" from the Gallery at the old portal http://manage.windowsazure.com, see below.

    Then, doing the set up deployment from source control at the quick glance of the web app dashboard page to deploy your web app.

    Now, browse the web app http://<app-name>.azurewebsites.net that works fine.

    0 讨论(0)
提交回复
热议问题