title: IISNode Socket.io NodeJS app (connect from c# using socketio4net)
body: <p>I have simple nodejs server running using iisnode.</p>
  
  <pre><code>var app = require('http').createServer(handler);
  var io = require('socket.io').listen(app);
  
  io.configure(function () {
      io.set('transports', ['xhr-polling']);
      if (process.env.IISNODE_VERSION) {
          io.set('resource', '/nodejs/socket.io');
      }
  });
  
  function handler(req, res) {
      res.writeHead(200);
      res.end("Node JS is Running");
  }
  
  io.sockets.on('connection', function (socket) {
          console.log('a socket is connected');
      });
  
  app.listen(process.env.PORT);
  </code></pre>
  
  <p>I want to talk to this socket from c# code (not javascript). I was running the nodejs server without iisnode before and the following code worked.</p>
  
  <pre><code>Client socket = new Client("somelink");
              socket.Error += SocketError;
              socket.On("connect", (fn) =&gt;
                  {
                      socket.Emit("new_order", 301);
                  });
  
              socket.Connect();
  </code></pre>
  
  <p>But now I am running the server using iisnode and I cannot connect using the same code. I had to change my javascript code to connect to the server too.</p>
  
  <p>from : => </p>
  
  <pre><code>var socket = io.connect('somelink');
  </code></pre>
  
  <p>to: =></p>
  
  <pre><code> var socket = io.connect('somelink', {resource: 'nodejs/socket.io'});
  </code></pre>
  
  <p>My question is how do I change my c# code to connect to the nodejs server running on iisnode.</p>
  
  <pre><code>Client socket = new Client("somelink/nodejs/socket.io");
  </code></pre>
  
  <p>doesn't work. (handshake error) </p>