I am facing a file not found issue while setting up my classic asp website in windows 7 which has iis 7.5 in it. It was working perfectly fine in windows xp which had iis 5, I guess.
When I am trying to access the file header.asp (which is located in "test\\include_files\\header.asp") from "test\\manager\\team.asp" it tries to look for the header.asp in the path "test\\manager\\include_files\\header.asp" whereas it should look into "test\\include_files\\header.asp".
In the file team.asp, this is how I am calling the file: <!-- #include file="../include_files/header.asp" -->
I understand in IIS 6 and above the parent path is not enabled by default and I have enabled it through IIS Manager but still no luck. I searched the Internet and also this site, and the only thing that needs to be done it seems is to enable the parent path which I have already done. I also tried by typing in the full path as in: "test\\include_files\\header.asp" but no luck!
Please advise what else needs to be done to have it working. Thanks in advance for your help and time!
When you use include file
, you must refer to the file as drive path, not web path.
So change your /
to \\
, like this:
<!--#include file="..\include_files\header.asp"-->
If you would like to do include virtual
then you can use /
instead of \\
.
<!--#include virtual="../include_files/header.asp"-->
So to resolve your issue, change the \\
to /
or change from include file
to include virtual
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.