4

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.

2
  • 1
    Did you find an answer for this in the end? I'm getting "web.config not found in project, to create a project to deploy to Windows Azure you must create a Windows Azure Node.js project." when trying to deploy my node app to azure. I haven't found any documentation relating to this either. Commented Dec 6, 2013 at 9:21
  • 1
    No, I haven't found anything yet. I know some elements of the xml file a.k.a. web.config, but the separate parts of the web.config are distributed across the azure documentation. Commented Dec 6, 2013 at 9:41

2 Answers 2

4

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Ok, but why isn't there any documentation about the contained values of this config? I'll mark your comment as solution, since it's the only help so far one can get :-)
Agreed. I haven't been able to find detailed documentation either, only what can be found at NodeJsTools. However, as the files are auto-generated hopefully you aren't blocked. The one thing that I've had to change is iisnode path. It defaults to "server.js" which you may not necessarily be using.
3

Create Azure Basic Node.js Express Application

Azure node application

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.