“You do not have permission to view this directory or page” error in Azure

后端 未结 1 1389
既然无缘
既然无缘 2021-01-16 20:50

I have never used Azure before and I followed the following tutorial: https://docs.microsoft.com/en-us/azure/app-service/app-service-web-get-started-nodejs#create-a-project-

相关标签:
1条回答
  • 2021-01-16 21:44

    I followed this sample node.js app: nodejs-docs-hello-world and deploy it to azure.It works fine,please refer to web.config file:

    <?xml version="1.0"?>
    <configuration>
      <system.web> 
        <compilation batch="false" />
      </system.web>
      <system.webServer>
        <handlers>
          <add name="iisnode" path="scripts.js" verb="*" modules="iisnode" />
        </handlers>
        <rewrite>
          <rules>
            <rule name="myapp">
              <match url="/*" />
              <action type="Rewrite" url="scripts.js" />
            </rule>
          </rules>
        </rewrite>
      </system.webServer>
    </configuration>
    

    I suggest you navigating to the KUDU url: https://<your app name>.scm.azurewebsites.net/DebugConsole and go to site\wwwroot to check if the files are contained within a directory.

    Or discard zip deploy temporarily, just drag the local files directly to the d:home\site\wwwroot directory and try again.

    For more solutions, please refer to the threads as below:

    1.Getting error after pushing to Windows Azure: You do not have permission to view this directory or page

    2.https://github.com/Azure-Samples/nodejs-docs-hello-world/issues/9

    Hope it helps you ,any concern please let me know.

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