问题
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