I have googled for the past 3 hours and found nothing on what to do with respect to the windows azure problem:
You do not have permission to view this directory or page.
I did a git master push to azure and the deployment was successful. I also turned on the failed request tracing but nothing shows up but the above statement.
Any ideas on how to troubleshoot this?
Check Web App > Authentication /Authorization and Web App > Networking > Access Restrictions. Create the production build by executing 'npm run build' command. A build folder will be generated in the solution with some meta data files. Reference the build folder while deploying the react app to azure.
Select Azure Active Directory > App registrations, and then select your client application. Select API permissions > Add a permission > Microsoft Graph > Application permissions.
If you want to change web. config files you can use the Azure portal, there is a tool called "App Service Editor" in preview or Kudu that lets you edit any of the files you've deployed.
To access the KUDU console, you need your Azure credentials, and navigate to https://****.scm.azurewebsites.net, where **** is the name of your Function App. Note you can also get access through the platform feature in the portal by clicking the Advanced tools (KUDU).
I just tested that if you don't deploy your main node.js file as server.js you will get this error because the web.config is specifically looking for server.js as below:
<handlers> <add name="iisnode" path="server.js" verb="*" modules="iisnode"/> </handlers>
To further troubleshot this issue you can access the website over FTP as described here.
AvkashChauhan's answer did lead me in the right direction but I also had to add proper rewriting rules. Here is my complete web.config
<?xml version="1.0"?> <configuration> <system.web> <compilation batch="false" /> </system.web> <system.webServer> <handlers> <add name="iisnode" path="server.js" verb="*" modules="iisnode" /> </handlers> <rewrite> <rules> <rule name="myapp"> <match url="/*" /> <action type="Rewrite" url="server.js" /> </rule> </rules> </rewrite> </system.webServer> </configuration>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With