'"The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used." when node js app deployed to azure app service
I created azure app service and deployed node js app into it through Filezilla by connecting through FTP. but when i test it in postman using "post
" method with url "https://nextgen-stormleads3.azurewebsites.net/api/v1/auth/login".
it's giving error as The page cannot be displayed because an internal server error has occurred.
other than my node files i have included a web.config file in the app service with following code
https://gist.github.com/davidebbo/8ad0d30ac1b1aa3d0334
can anyone suggest what iam doing wrong here?
i have added your suggested code in web.config still no change same error as before
Solution 1:[1]
"The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used." when node js app deployed to azure app service
Refer SO Thread
500 internal server error
- Enable node.js application level log to see the detailed error message.
- When you deploy your project to Azure, Make sure you have changed the listen port . We should use
app.listen(process.env.PORT);
in your app.js file. - Azure app service only supports 80/443 port. You should use
app.listen(process.env.PORT);
and access your app withhttp://<app_name>.azurewebsites.net
. - Review your IP-Level firewall rules to allow the IPs listed within your App Service's
Outbound IP Addresses
and turned onAllow Azure services and resources to access this server
. Refer manage server-level IP firewall rules
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | HarshithaVeeramalla-MT |