iisnode

IIS returns 500 when Node app returns a 4xx

流过昼夜 提交于 2019-12-21 17:21:50
问题 I have also asked this on the iisnode github project I am using IISNode via a Windows Azure Website. If my Node app returns a 2xx status code (200, 201, etc), then all is well and works as expected. if my Node app returns a 4xx status code, for example: response.send(404, "not found") (I am using Restify) then I get a 500 sent to the client and the body is simply "The page cannot be displayed because an internal server error has occurred." If I do azure site log tail <sitename> , then when

Calling localhost urls on Azure's IISNode

这一生的挚爱 提交于 2019-12-20 04:12:20
问题 I am running into some issues with running a Node app on Azure WebSites due to IISNode. Basically the issue is that I am relying on the port number being a number, which frankly is not the case on Azure ... Here the port number is actually a named pipe, and has values like \\.\pipe\76deda07-ef5c-4539-87d8-755ede772521 . Thus, the following piece of code, which routes an internal request back onto the HTTP routes defined on localhost, does not work: function getFromLocalRoute(restPayloadObject

Calling localhost urls on Azure's IISNode

陌路散爱 提交于 2019-12-20 04:12:11
问题 I am running into some issues with running a Node app on Azure WebSites due to IISNode. Basically the issue is that I am relying on the port number being a number, which frankly is not the case on Azure ... Here the port number is actually a named pipe, and has values like \\.\pipe\76deda07-ef5c-4539-87d8-755ede772521 . Thus, the following piece of code, which routes an internal request back onto the HTTP routes defined on localhost, does not work: function getFromLocalRoute(restPayloadObject

IIS, Node.js, and Web Application with IISNode not configured right with Virtual Directory

Deadly 提交于 2019-12-17 02:50:13
问题 I have the following setup in IIS: Default Web Site (www.foo.com) hosting standard html site Web Application underneath Default Web Site (www.foo.com/bar) running IIS Node Node project is utilizing express I cannot for the life of me get this thing configure correctly so when I hit the web application is serves up the node application correctly. I think my problem lies in the web.config. Can anybody help me write a correct web.config to get this working correctly? The current version of my

How to enable static files (and less support) when hosting a nodejs app within IIS using IISNode

社会主义新天地 提交于 2019-12-13 21:18:37
问题 Background: Nodejs app using expressjs. Hosted on IIS using IISNode Nodejs app is in virtual directory called /myVirtualDirectory Problem: You want to provide static files or css using less but the url that is passed to nodejs is the full url and doesn't match what would be expected with a standalone nodejs app. 回答1: Solution: var express = require('express'); var app = express(); var lessMiddleware = require('less-middleware'); app.use('/myVirtualDirectory', lessMiddleware({ src: __dirname +

Point iisnode at server.js file nested in folder in an iis website

前提是你 提交于 2019-12-13 16:49:00
问题 I having trouble getting iisnode to run my node application. My directory structure is iis-site -client -server -server.js How can I get iisnode to point to a nested .js file? I tried this, but it servers the server.js instead of executing it. <handlers> <add name="iisnode" path="server\server.js" verb="*" modules="iisnode" /> </handlers> and <rule name="default"> <match url="/*" /> <conditions logicalGrouping="MatchAll" trackAllCaptures="false" /> <action type="Rewrite" url="server/server.js

Code sample socket.io on iisnode and azure [closed]

自古美人都是妖i 提交于 2019-12-13 08:37:43
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . Can someone please post a working code sample of a node.js app that uses socket.io running on iisnode and azure. It seems that IIS doens't play nicely with socket.io and any code sample I've found don't run on

Intercept requests for iisnode with HttpModule

孤者浪人 提交于 2019-12-13 04:07:03
问题 I have a nodejs app running using iisnode in a sub directory for a .net application (umbraco actually). The .net application is using forms authentication and I want to secure the iisnode application using the same mechanism as the .net application. I've tried registering modules with the iisnode app but it doesn't even seem to fire the event handlers. Is it possible to do this? 回答1: It seems that creating an HttpModule to intercept nodejs requests is impossible. However, I did find a way to

How to start node js script in a windows azure cloud project?

邮差的信 提交于 2019-12-13 03:59:27
问题 Am very new to node js and socket.io. I am using socket.io for a windows azure project. I have created an App.js which starts the socket.io server, but i dont know how to programatically run that script. I am able to run that script from command prompt like "node app.js" and the socket.io server starts and the client app is able to interact with socket.io server well. I can also go to 127.0.0.1/App.js and the socket.io server starts. But I want the script to automatically run as soon as i

nodejs socket.io with IIS Node

拟墨画扇 提交于 2019-12-13 01:06:58
问题 I have tried something with node.js in windows vista/IIS 7 using iis node. My idea is to use a server script on the asp .net mvc application to connect to another socket server and serve requests on a persistent fashion. I downloaded the iisnode version at https://github.com/tjanczuk/iisnode for IIS 7 and able to run the basic 'hello world' http server pipe using http handler mappings in web.config and IIS modules configuration. I am trying to use socket.io library from node.js. This works