经典 ASP #include 虚拟不工作

Uns*_*end 3 iis-6 include asp-classic iis-8

我们正在从 IIS6/2003 迁移到 IIS8/2012。我们必须维护一些经典的 ASP 以及 ASP 和 .NET 应用程序。完整的应用程序似乎运行良好(例如,我进入 IIS,右键单击文件夹并执行“转换为应用程序”的那些应用程序),但我们的站点严重依赖包含 html 文件的菜单。奇怪的是,我 99% 确定这之前可以正常工作,但是当我们为新服务器拨动开关时,菜单没有出现。

文件结构看起来像这样

wwwroot/dir/blah.html
wwwroot/dir/incb.html
wwwroot/ssi/inca.html
Run Code Online (Sandbox Code Playgroud)

现在,在 blah.html 中,我有两个包括:

<!-- #include file="incb.html" -->
<!-- #include virtual="ssi/inca.html" -->
Run Code Online (Sandbox Code Playgroud)

第一个有效,第二个无效。我试过这个:

<!-- #include file="../ssi/inca.html" -->
Run Code Online (Sandbox Code Playgroud)

但它仍然没有包括在内,只是作为评论出现在最后一页。我尝试使用/检查权限,但它看起来是正确的。我还在服务器和站点本身的 IIS->ASP 下将“启用父路径”设置为 true。想知道是否有人有任何想法?

Uns*_*end 6

启用服务器端包含模块作为服务器管理中的一项功能,然后将 .html 的处理程序映射添加到 SSI 模块。

这家伙把这一切都说了一遍:https : //www.youtube.com/watch?v=foLClXY3wTE