我已经配置了 iisnode 所需的所有内容。但是当我浏览该网站时http://localhost/后端 http://localhost/Backend(后端是 iis 上托管的站点名称)然后什么也没有发生,页面继续加载。
我的网络配置:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="iisnode" path="index.js" verb="*" modules="iisnode" />
</handlers>
<rewrite>
<rules>
<rule name="nodejs">
<match url="(.*)" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" pattern="" ignoreCase="true" negate="true" />
</conditions>
<action type="Rewrite" url="/index.js" />
</rule>
</rules>
</rewrite>
<security>
<requestFiltering>
<hiddenSegments>
<add segment="node_modules" />
<add segment="iisnode" />
</hiddenSegments>
</requestFiltering>
</security>
</system.webServer>
</configuration>
尝试通过预先设置将“应用程序池”->“空闲超时”设置为“0”,并检查具体问题是什么。确保您安装了 iisnode 模块。
iisnode 模块指示index.js 文件是由iisnode 模块处理的node.js 应用程序。
link:
https://forums.asp.net/t/2145697.aspx?deploy+nodejs+web+api+in+IIS+服务器 https://forums.asp.net/t/2145697.aspx?deploy+nodejs+web+api+in+IIS+server
https://github.com/tjanczuk/iisnode/blob/master/src/samples/configuration/web.config https://github.com/tjanczuk/iisnode/blob/master/src/samples/configuration/web.config
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)