title: Can't get IISNode,socket.io and express to work together
body: <p>Please read my question,even a small piece of advice will be received with gratitude.</p>
  
  <p>I am getting the following error in Google Chrome: </p>
  
  <pre><code> GET http://localhost/socket.io/?EIO=3&amp;transport=polling&amp;t=1419089743449-2 404 (Not Found)
  </code></pre>
  
  <p>My folder setup is as follows:</p>
  
  <blockquote>
    <p>localhost</p>
    
    <blockquote>
      <p>pro</p>
      
      <blockquote>
        <p>public</p>
        
        <blockquote>
          <p>socket.io/socket.io.js</p>
          
          <p>cssfile.css</p>
          
          <p>jsfile.js</p>
        </blockquote>
        
        <p>app.js</p>
        
        <p>node_ modules</p>
      </blockquote>
    </blockquote>
  </blockquote>
  
  <p>It seems to me that the request made by the client for the handshake is wrong because the error should be localhost/pro/public/socket.io/blah blah .</p>
  
  <p>I am using the following setup: </p>
  
  <p>web.config :</p>
  
  <pre><code>&lt;handlers&gt;
   &lt;add name="iisnode" path="app.js" verb="*" modules="iisnode" /&gt;
  &lt;/handlers&gt;
  &lt;rewrite&gt;
   &lt;rules&gt;
    &lt;rule name="DynamicContent"&gt;
     &lt;match url="/pro/" negate='True'/&gt;
     &lt;!--&lt;conditions&gt;
      &lt;add input="pro" matchType="IsFile" negate="True"/&gt;
     &lt;/conditions&gt;--&gt;
     &lt;action type="Rewrite" url="app.js"/&gt;
   &lt;/rule&gt; 
   &lt;rule name="LogFile" patternSyntax="ECMAScript"&gt;
    &lt;match url="socket.io"/&gt;
    &lt;action type="Rewrite" url="app.js"/&gt;
   &lt;/rule&gt;               
  &lt;/rules&gt;
  &lt;/rewrite&gt;
  </code></pre>
  
  <p>client side js:</p>
  
  <pre><code> var socket = io.connect('http: //localhost', {resource: 'pro/public/socket.io' }); 
  </code></pre>
  
  <p>server side js(node):</p>
  
  <pre><code> var http = require('http');
  
   var express = require('express');
   var app = express();
   var port = process.env.PORT || 3002;
  
   var server = http.createServer(app).listen(port);
  
   io = require('socket.io').listen(server, { resource : '/pro/public/socket.io' });
  </code></pre>
  
  <p>I get html as expect and the static files are served as well; I just can't get socket.io to work.</p>