0

I am just trying to get node and websockets running alongside an ASP.NET MVC project. I am running on Server 2012, IIS8, latest node.js and iisnode. Websockets are enabled for IIS and .NET 4.0 MVC project runs fine. Also, I can run websockets on node independent of IIS just fine (on a separate port).

I downloaded the faye websocket and the dante example project and installed it.

When I do not have websockets disabled, I get

Unable to establish WebSocket connection to ws://localhost/dante/server.js

When I disable websockets, whether in dante or wwwroot, I get

This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".

I tried to specify overrideMode="Allow" in the wwwroot webconfig and that didn't seem to work.

I have also tried removing the wwwroot web.config and it seems to make no difference. I also tried turning off the firewall on the server (just for kicks) and that didn't change anything.

Thanks for any help and assistance. I am open to using anything (socket.io, for example) but would like to keep running ASP.NET MVC and node on the same port to eliminate firewall issues and prevent having to use multiple servers/domains/etc.

EDIT: Running

c:\windows\system32\inetsrv\appcmd.exe unlock config -section:system.webServer/webSocket

Made the IIS error go away, but now I still receive this:

Unable to establish WebSocket connection to ws://localhost/dante/server.js/ws WebSocket connection is closed.

I've opened an issue here.

EDIT 2: I had installed iisnode from the Web Platform Installer. Apparently, the version from WebPI is old. I needed to get the latest from the github site here under Installing for IIS 7.x/8.x. Once I installed the latest version, IT WORKS! This is fantastic! Thanks to tjanczuk! :)

aikeru
  • 3,773
  • 3
  • 33
  • 48

1 Answers1

1

iisnode added support for websockets starting from version 0.2.0. Make sure you install the latest iisnode using links from https://github.com/tjanczuk/iisnode.

Tomasz Janczuk
  • 3,220
  • 21
  • 19
  • You replied quickly, thank you! I'm a bit further, but still have an issue. I've updated the question. – aikeru Dec 18 '12 at 06:08