title: running express.js app in Asp.net MVC
body: <p>I would like to run node.js with asp.net mvc for performing socket.io operations.<br></p>
  
  <p>i've successfully included the node.js in asp.net mvc as described in <a href="http://weblogs.asp.net/jgalloway/archive/2011/10/26/using-node-js-in-an-asp-net-mvc-application-with-iisnode.aspx" rel="nofollow">here</a></p>
  
  <p>my problem is how to run express.js in asp.net mvc,</p>
  
  <p>i've performed the url rewritting in Global.asax.cs file like<br></p>
  
  <p>void Application_BeginRequest(object sender, EventArgs e)<br>
          {<br>
              // Get current path<br>
              string CurrentPath = Request.Path.ToLower();<br>
    if (CurrentPath.StartsWith("/node"))<br>
              { HttpContext MyContext = HttpContext.Current;<br>
                  MyContext.RewritePath("/Node/index.js/");<br>
              }<br>
  }<br></p>
  
  <p>so in the url <b>http:localhost:1234/node</b> should redirect me to the index.js file in Node folder</p>
  
  <p>it is all working well but,
  when i start coading express.js server in index.js like<br></p>
  
  <p>var express = require('express');<br></p>
  
  <p>var app = express.createServer();<br></p>
  
  <p>app.get('/node/', function (req, res) {<br>
      res.send(' welcome to express ');<br>
  });<br></p>
  
  <p>app.listen(process.env.PORT);<br></p>
  
  <p>I got error saying <b>Cannot GET /Node/index.js/</b><br></p>
  
  <p>where am i missing? please guide me how to write express.js coading in asp.net mvc</p>
  
  <p>Iam running this application in windows 7 32 bit system with IIS 8.0 express , and installed node versions are<br>
  iisnode.js - iisnode-full-iis7-v0.2.3-x86<br>
  node.js - node-v0.8.19-x86<br></p>
  
  <p>Thank you.</p>