Giter Club home page Giter Club logo

iisnode's Introduction

NOTE: Official branch is azure/iisnode

TL;DR; I no longer maintain or monitor this repository. Please go to azure/iisnode for the latest version of the stack and/or to file any issues.

I developed the iisnode technology to enable hosting Node.js applications in IIS, specifically in the Azure Websites, back when I was working at Microsoft. When I left the company in 2013, Microsoft decided to retain ownership of the stack. While I cannot speak to the current state of affairs or plans going forward, as of this writing, iisnode appears to still power execution of Node.js apps in Azure, and the azure/iisnode fork is where the action happens. Happy Noding!

-- @tjanczuk, 9/21/2018

Hosting node.js applications in IIS on Windows

Branches

  • master: stable version.
  • iisnode-dev: development branch.

Why would I want to do it?

Benefits

Who uses iisnode?

Prerequisites for using

Installing for IIS 7.x/8.x

  • Install iisnode for IIS 7.x/8.x: x86 or x64 - choose bitness matching your system
  • To set up samples, from the administrative command prompt call %programfiles%\iisnode\setupsamples.bat
  • Go to http://localhost/node

Installing for IIS Express/WebMatrix

  • Install WebMatrix using the Web Platform Installer
  • Open WebMatrix, choose “Site from folder”, enter %localappdata%\iisnode\www, start the site, and play with the iisnode samples, or
  • Use node.js templates to get started quickly with an Express application or a skeleton Hello World

Installing for IIS Express 8 on Windows x64 This can be a head-scratcher since IIS Express 8 gives you both 32-bit and 64-bit versions (http://www.iis.net/learn/extensions/introduction-to-iis-express/iis-80-express-readme). You can either:

  • Install the full x64 version, then in Visual Studio go to Tools > Options > Projects and Solutions > Web Projects > Use the 64 bit version of IIS Express. This way you have a single install for both IIS and IIS Express.
  • Separately install iisnode express version (https://github.com/azure/iisnode/wiki/iisnode-releases).

Howtos

Prerequisites for building

Building

Build commands should be issued from the build environment set up with "%programfiles(x86)%\Microsoft Visual Studio 11.0\Common7\Tools\VsDevCmd.bat", assuming default installation location of Visual Studio 2012 on x64 platform.

For x86 build:

msbuild /p:Platform=Win32 src\iisnode\iisnode.sln

For x64 build:

msbuild /p:Platform=x64 src\iisnode\iisnode.sln

Installing after build

  • For IIS 7.x/8.0: build\debug\{x64|x86}\iisnode-full.msi
  • For IIS Express 7.x: build\debug\x86\iisnode-express.msi

Running tests

  • Install for IIS 7.x/8.x (see previous sections)
  • test\functional\test.bat
  • note that for the WebSocket tests to pass you must be running in IIS 8.x on Windows 8 or Windows Server 2012

Resources & documentation

iisnode's People

Contributors

avanderhoorn avatar dpolivy avatar paulinetheitgirl avatar pmanijak avatar pofallon avatar rramachand21 avatar rramachand21-zz avatar tjanczuk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iisnode's Issues

The Module DLL iisnode.dll failed to load

Not sure what the exact issue is but as you can see by the title iisnode isn't loading... 0000007f

This is the setup 32-bit XP Pro SP3 with Webmatrix (tried 1 and new 2.0 beta) and IIS Express 7.5

I'm thinking iisnode either that can't find the node.exe or can't get permissions to it but the error logged message is a little .... sparse.

To try and get it to work I have.... changed the permissions for the nodejs folder (from the installer from your blog) to include "Eveyone" to have full access but no change. Then I deleted the config from the My Documents\IISExpress\config folder to let webmatrix rebuild it... I then noticed that the global iisnode module reference was not included so I re-ran the iisnode-express installer (0.1.7.x86) repaired and the entries were created but there was no entry under web server... not sure if was needed... so I created one with the nodeProcessCommandLine set to various seetings of %programfiles% or real paths.... moving node.exe to %IIS_BIN% using %NODE_PATH% etc but to no avail

So maybe it isn't the path nor permissions any ideas?

Handler "iisnode" has a bad module "iisnode" in its module list

HTTP Error 500.21 - Internal Server Error

I'm am getting this error on a clean download and install of iisnode-iis7-v0.1.7-x86.msi under Windows 7 x64 with VS2010 installed.

No matter how I tweak permissions, app pool settings etc, I keep getting this.

Any ideas?

thanks, Andrew

Socket.IO and IISNode

Tomasz, how is it possible to include Socket.IO client library using IIS node?
According to official site recommendations, browser must follow url like http://[daemon]:[port]/socket.io/socket.io.js
For e.g., daemon runs as /server.js with rule

add name="iisnode" path="/server.js" verb="*" modules="iisnode"

I should use a rewrite of some sorts or there is another, better way?

Node.exe randomly freezes on Windows 7 x64 / IIS 7 / iisnode_amd64

Node process randomly freezes (does not accept new connections).
Application pool also hangs.

User must kill all node.exe instances "by hand" to overcome this.

OS: Win 7 Ultimate x64 / Intel i7 2600
IIS 7 (64bit)
IISNode for AMD 64 (0.1.3).

Behaviour of the previous build (32bit) is same.

Site cannot run

I get the following error when trying to start the site in Webmatrix. "The worker process failed to initialize correctly and therefore could not be started. The data is the error."

I also noticed this in the error logs. "The Module DLL C:\USERNAME\AppData\Local\iisnode\iisnode.dll failed to load. The data is the error."

HTTP 500 got on x64 systems.

OS: Server 2008 R2 (x64 only)
IIS: 7.5
iisnode version: 0.1.6-amd64
nodejs version: both your 0.5.7-pre and official 0.5.7

It always returns 500. Fail tracking shows that iisnode throwed MODULE_SET_RESPONSE_ERROR_STATUS with exception 试图加载格式不正确的程序 (0xb) (translation: An attempt was made to load a program with an incorrect format).

add health monitoring

when node.exe dies or becomes unresponsive, terminate active requests and recycle process scope resources in the iis module

add html page to facilitate browsing of log files

add a default.html page that can be checked into the logs directory or saved by iisnode automatically. the page helps to browse log files stored in that directory - detect and navigate the many log files plus ajax-based short polling to refresh the logs.

Node path

You state in the documentation that node should be located at %systemdrive%\node directory. Is there any chance to use the environment variable NODE_PATH, which is the same variable as Node uses for resolving the external module dependencies in windows ?.

Thanks
Pablo.

fs cannot access files

System Configuration

Windows 2008 64bit
node.exe v0.5.5
iisnode amd64

Problem description

I can't seem to read files with the fs modules in iisnode.

Steps to reproduce

Modify the hello.js example to contain the following code.

var http = require('http');

http.createServer(function (req, res) {
    res.writeHead(200, {'Content-Type': 'text/plain'});

    var data = require('fs').readFileSync("helloClient.js");
    res.end('Hello, world! [helloworld sample]' + data);
}).listen(process.env.PORT); 

Browse to hello.js in a web browser.

The following error is displayed:

fs.js:222
  return binding.open(path, stringToFlags(flags), mode);
                 ^
Error: ENOENT, The system cannot find the file specified. 'helloClient.js'
    at Object.openSync (fs.js:222:18)
    at Object.readFileSync (fs.js:113:15)
    at Server.<anonymous> (C:\inetpub\iisnode\www\helloworld\hello.js:7:19)
    at Server.emit (events.js:70:17)
    at HTTPParser.onIncoming (http2.js:1453:12)
    at HTTPParser.onHeadersComplete (http2.js:108:31)
    at Socket.ondata (http2.js:1349:22)
    at Pipe.onread (net_uv.js:312:27)

express does not work

From Pablo Cibraro:

The module works great. I had some difficulties at the beginning to configure it, but it works in the end. It works fine for simple samples, but I guess the hard part would be to get it working with many of the libraries and frameworks out there. I tried to get it working last night with Express with no luck. Express is a Sinatra inspired web development framework for Node (Equivalent to WCF Web Api or MVC in the Node world). Unfortunately, it does not work as the framework does not like the named pipes addresses that the IIS module uses to communicate with the worker process running Node.

Getting 503

Hello,
Not sure if I should post this here...
I just installed iisnode and keep getting an 503 error on al my pages.
Any suggestions on this matter?
Thanks,
Peter

Add:
For some reason DefaultAppPool stops when trying to access a page or folder on the server.
The 503 comes from HTTP.sys because the pool is stopped. Mostlikely due to too much errors.
When I set the value of "Quick security against errors" to false the request keeps 'polling'.
Note: I have a dutch iis. So I tried to translate some iis feateures to english.

fix iis express config section registration

replace regex manipulation with programmatic modification

var versionMgr = new ActiveXObject("Microsoft.IIS.VersionManager");
var iisex = versionMgr.GetVersionObject("7.5",2);
var ahwrite = iisex.CreateObjectFromProgId("Microsoft.ApplicationHost.WritableAdminManager");

Installing iisnode in iisexpress

Hi!

I followed the instructions of how to install it from the link in the readme(http://tomasz.janczuk.org/2011/08/developing-nodejs-applications-in.html)

I could not use the msi installers because I'm in a x64, so I got the source and compiled to x86, and when I tryied to run install_iisexpress.bat there was a file missing 'addiisnodesectiongroup.js', then I just search for it in the history and got it......

And It worked.

Do not know if that file was meant to be deleted, anyway.....

Thanks for the iisnode!

The iisnode module can not be loaded

I am getting this error in a Win7 x64 (Intel) machine while trying to use the module. The application pool is marked to run 32 bits applications.

The Module DLL 'D:\nodejs\iisnode\iisnode.dll' could not be loaded due to a configuration problem. The current configuration only supports loading images built for a AMD64 processor architecture. The data field contains the error number. To learn more about this issue, including how to troubleshooting this kind of processor architecture mismatch error, see http://go.microsoft.com/fwlink/?LinkId=29349.

Any idea ?. Do I need to build an specific version for x64 ?.

Thanks

Permissions requirements are unclear

I had to make a LocalSystem custom AppPool to get the samples to work. I'm sure this is a simple permissions issue, but it's unclear what permissions need to be give to the AppPool, iisnode and node.exe. Please advise?

express sample does not work on iisexpress

This is due to a difference in the expected path between iis7 setup of the samples and iis7express (no root 'node' component of the path in the iis7express case). Find a way to make this sample work for iis7 and iis7express.
@Gissues:{"order":10.995370370370372,"status":"backlog"}

HTTP Error 503.0 - Service Unavailable

Hello everyone and sorry my English but I will try to explain the possible maxmem

I have seven windows with iis 7.5 I'll start my tests with Node.js, but since I performed all the steps I found here but still problem with HTTP Error 503.0 - Service Unavailable

what can I do to try to solve the problem?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.