-1

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 iisonde/azure...

When I try to connect vie socketio to http://mysite:8080 azure returns a HTTP 500 error...

thanks

AIDAN CASEY
  • 319
  • 2
  • 11
  • What samples have you found (links)? What happens when you try to run them? I would edit your question to include this. – Rohan Singh Feb 05 '12 at 08:35
  • Not sure why this question was closed. There's a valid answer given, that of needing a Worker Role for socket.io. The question could be reworded a bit, but I suspect others will run into this same issue. – David Makogon Feb 05 '12 at 15:39
  • Hi Rohan, I dont think this question should have been closed and I have now found a resolution to the problem - basically you need to use port 81 ot connect to socket.io otherwsie you get a HTTP 500 error thrown from azure with no other information. – AIDAN CASEY Feb 06 '12 at 01:57

1 Answers1

5

socket.io does not work with IIS. You have to use Worker Role with node.js in order to use socket.io. Check out the following blog posts and pay attention to the worker role part:

astaykov
  • 30,768
  • 3
  • 70
  • 86
  • I figured out the problem after referring to the link , You need to use port 81 to connect to socket.io in azure and - I have added more comments to this post... •http://nodeblog.cloudapp.net/running-socket-io-on-windows-azure-web-and-worker-roles. – AIDAN CASEY Feb 06 '12 at 01:54
  • if anyone is interested I've a working sample now up on GitHub – AIDAN CASEY Mar 09 '12 at 10:18