经典ASP #include虚拟无法正常工作 [英] Classic ASP #include virtual not working

查看:74
本文介绍了经典ASP #include虚拟无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正处于从IIS6/2003到IIS8/2012的迁移中.我们必须维护一些经典的ASP和ASP和.NET应用程序.完整的应用程序似乎运行良好(例如,我进入IIS的应用程序,右键单击文件夹,然后执行转换为应用程序"),但是我们的网站在很大程度上依赖于包含html文件的菜单.奇怪的是,我99%的确定这是以前可行的,但是当我们翻动新服务器的开关时,菜单没有出现.

We're in the middle of a migration from IIS6/2003 to IIS8/2012. We have to maintain some Classic ASP and ASP and .NET apps. The full applications seem to work fine (as in, the ones I went in to IIS, right clicked on the folders and did "Convert to Application"), but our site relies heavily on menus that are included html files. The weird thing is, I'm 99% sure this was working before, but when we went to flip the switch for the new server, the menus didn't appear.

文件结构如下

wwwroot/dir/blah.html
wwwroot/dir/incb.html
wwwroot/ssi/inca.html

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

Now, within blah.html, I have two includes:

<!-- #include file="incb.html" -->
<!-- #include virtual="ssi/inca.html" -->

第一个有效,第二个无效.我试过了:

The first one works, the second doesn't. I tried this:

<!-- #include file="../ssi/inca.html" -->

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

But it still wasn't included, and just appears as a comment on the final page. I tried playing with/checking the permissions, but it looks correct. I also have "Enable Parent Paths" set as true under IIS->ASP for the server and the site itself. Was wondering if anyone had any thoughts?

推荐答案

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

Enable the Server Side Include module as a feature in Server Management, then add a handler mapping for .html to the SSI module.

这个家伙仔细研究了所有内容: https://www.youtube.com/watch?v = foLClXY3wTE

This guy goes over it all: https://www.youtube.com/watch?v=foLClXY3wTE

这篇关于经典ASP #include虚拟无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆