Nodejs in Visual Studio Code 14.IISNode与IIS7.x

1.开始html

  部署IISNode环境请参考:Nodejs in Visual Studio Code 08.IISnode

  部署Nodejs程序请参考:Nodejs in Visual Studio Code 10.IISNodeweb

  IISNode版本:v0.2.21windows

  

2.IIS 7.x浏览器

  目前版本v0.2.21默认要求Web服务器支持WebSockets,由于IIS7.x不支持(windows 7,2008),没法使用iisnode中的Node Inspector模块使用浏览器进行远程调试。服务器

  解决的方式很简单,在web.config中增长一个配置节<iisnode debuggerExtensionDll="iisnode-inspector.dll" />app

<configuration>
  <system.webServer>
    <!-- index.js 是myapp的启动程序 -->
    <handlers>
      <add name="iisnode" path="index.js" verb="*" modules="iisnode" />
    </handlers>
    <rewrite>
      <rules>
        <rule name="myapp">
          <match url="index.js/debug" negate="true" />
          <action type="Rewrite" url="index.js" />
        </rule>
      </rules>
    </rewrite>
	<!-- iis7下调试 -->
	<iisnode debuggerExtensionDll="iisnode-inspector.dll" />
  </system.webServer>
</configuration>

 

相关文章
相关标签/搜索