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 and I can see that changes to the repository do indeed trigger a build and deploy.
However, the page I reach (http://ftct.azurewebsites.net/) complains: You do not have permission to view this directory or page.
I have specified a default file (kinda) in my node.js by using: app.get('/', routes.index);
So trying to navigate directly to this file, http://ftct.azurewebsites.net/signin.html, yields a different error: The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
I configured the app to run on port 1337 in Visual Studio, but using this port doesn't overcome the problem. Trying to navigate to a ported address yields a timeout.
Any ideas?
Also suggest you to check the IP restrictions or authentication settings on the Azure web application that may block you. Check Web App > Authentication /Authorization and Web App > Networking > Access Restrictions. Create the production build by executing 'npm run build' command.
Grant admin consent in App registrationsSelect Azure Active Directory, and then select App registrations. Select the application to which you want to grant tenant-wide admin consent. Select API permissions. Carefully review the permissions that the application requires.
In the Azure portal, navigate to your key vault and select Access policies. Select Add access policy, then select the key, secret, and certificate permissions you want to grant your application. Select the service principal you created previously. Select Add to add the access policy, then Save to commit your changes.
Review application permissionsSelect Azure Active Directory, and then select Enterprise applications. Select the application that you want to restrict access to. Select Permissions. In the command bar, select Review permissions.
I had the same issue,
you need web.config, package.json, server.js at the root
web.config:
<configuration>
<system.webServer>
<handlers>
<!-- indicates that the app.js file is a node.js application to be handled by the iisnode module -->
<add name="iisnode" path="server.js" verb="*" modules="iisnode" />
</handlers>
</system.webServer>
</configuration>
in package.json you need to have:
...
"scripts": {
"start": "node server"
},
...
and in your server.js make sure that you set the server port number to
process.env.PORT || 1337;
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