Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing Documentation for web.config for a Node.js application on Azure Website

I'm running a Node.js server as API for my mobile app on a Windows Azure Website. And I'm having some trouble with it due to the needed web.config - but I couldn't find any really helpful documentation about it. Everything I can find is googling for specific problems on it and with a bit luck I can use the config snippets.

  • is there any general documentation about the contents the web.config can contain and their meaning?
  • in the start I had the problem that errors were modified by IIS to a general error. But since it's a REST API I want the HTTP status codes to be returned. I got around that with the <httpErrors existingResponse="PassThrough" /> element, but it doesn't seem to work for every error.

The only documentation I found so far are example configuration files of the iisnode module.

like image 549
akohout Avatar asked Mar 21 '23 11:03

akohout


1 Answers

If you see the following error:

web.config not found in project, to create a project to deploy to Windows Azure you must create a Windows Azure Node.js project.

....you may have created the wrong type of Visual Studio Project. You want a "Windows Azure Node.js Application" not a "Node.js Web Application". The former creates a few extra files that are needed for Azure (Web.cloud.config & Web.config).

You may be able to create a dummy VS project of the correct type and then copy these files into your existing project. Alternatively create a new project of the correct type and copy your source files into the new project.

like image 154
Lars Avatar answered Apr 27 '23 09:04

Lars