Classic ASP #include virtual not working

大城市里の小女人 提交于 2019-12-21 20:58:32

问题


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.

The file structure looks like this

wwwroot/dir/blah.html
wwwroot/dir/incb.html
wwwroot/ssi/inca.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" -->

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?


回答1:


Under the ASP section in IIS did you enable parent paths? This is disabled by default.




回答2:


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

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



来源:https://stackoverflow.com/questions/24618164/classic-asp-include-virtual-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!