Ich erhalte den folgenden Fehler mit einem 403-Fehlercode, wenn ich versuche, zu meiner Azure-Website zu navigieren.Bereitstellen der Knoten-JS-Anwendung in Azure-Webdiensten
Sie sind nicht berechtigt, dieses Verzeichnis oder diese Seite anzuzeigen.
Ich habe die richtigen Seed-App-Dateien erstellt (ich glaube) unten aufgeführt, und bin verwirrt, warum ich immer noch in diesen Fehler läuft. Ich sehe nichts Verdächtiges in den Anwendungsprotokollen.
Logs:
Command: "D:\home\site\deployments\tools\deploy.cmd"
Handling node.js deployment.
KuduSync.NET from: 'D:\home\site\repository' to: 'D:\home\site\wwwroot'
Copying file: 'server.js'
The package.json file does not specify node.js engine version constraints.
The node.js application will run with the default node.js version 6.9.1.
Selected npm version 3.10.8
npm WARN [email protected] No description
Finished successfully.
Dateien:
server.js:
var express = require('express');
var app = express();
var PORT = process.env.PORT || 1337;
app.get('/', function (req, res) {
res.send('Hello World!!')
});
app.listen(PORT, function() {
console.log('App listening on port ' + PORT);
});
package.json:
{
...,
"scripts": {
"start": "node server",
"test": "echo \"Error: no test specified\" && exit 1"
},
...
}
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>