I'm trying to deploy my nodejs rest api application to my azure cloud, but i fail again and again.
I get HTTP 500 response.
"The page cannot be displayed because an internal server error has occurred."
My AZURE FTP (What I Uploaded) :
web.config file
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<webSocket enabled="false" />
<handlers>
<add name="iisnode"
path="app.js"
verb="*"
modules="iisnode"/>
</handlers>
<rewrite>
<rules>
<rule name="NodeInspector"
patternSyntax="ECMAScript"
stopProcessing="true">
<match url="^app.js\/debug[\/]?" />
</rule>
<rule name="DynamicContent">
<conditions>
<add input="{REQUEST_FILENAME}"
matchType="IsFile"
negate="True"/>
</conditions>
<action type="Rewrite" url="app.js"/>
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
URLs
Request : localhost/api/user/getcategories/5c141fa7498f3605c8b2cf34
Response :
{
"success": true,
"categories": [
{
"_id": "5c141fab498f3605c8b2cf35",
"name": "OTHER"
}
]
}
Request : https://**.azurewebsites.net/api/user/getcategories/5c141fa7498f3605c8b2cf34
Response : The page cannot be displayed because an internal server error has occurred.
