Basically, my question is... since I can't go up a level in the include statement anymore, can I use anabsolute path in a classic asp include statement? If so, what is the exact format to use?
Here is my situation:
I am migrating an old classic asp website from a Windows server running an old IIS to a Windows2008-2 server with IIS7.5 and running classic asp.
This new server does not have parent paths enabled (and they won't turn it on, and I can't get access to IIS control panel - as I am sharing the server with others).
So I am left with trying to find a way to re-code the includes that used to use arelative path to get to a sibling directory.
Here is my setup:
I use their free shared ssl and both these files need to be accessed securely (the secure path is:https://ssl5.ssllock.net/mysite.com/)
I have an an .asp file located at: /SMPSECR/my-inc.asp
I have a another .asp file located at: /PBB/my-test.asp
Inside of my-test.asp, I want to include my-inc.asp
On the old hosting server - I used to use this format:
<!--#include file="../smpsecr/my-inc.asp"-->
but since IIS6 that doesn’t work anymore (as I mentioned earlier parent paths are automatically disabled and my hosting company won't enabled it for security reasons as I am on a shared server).
It appears that IIS7.5 (with parent path disabled) won't allow you to start the path with ../ or even just /
The system support people from the hosting company suggested I use absolute path instead of relative.. I also read somewhere that youcan use virtual instead of file, but even that didn’t work for me.
What I have tried so far:
Here are the 10 different include tests (trying to use virtual and/or absolute paths)- that I have tried from inside of my-test.asp and failed for each one:
<!--#include file="https://ssl5.ssllock.net/mysite.com/smpsecr/my-inc.asp"--><!--#include file="https://ssl5.ssllock.net/mysite.com/smpsecr/my-inc.asp"--><!--#include file="\\n5200-2\iis7_www\f\s\mysite.com\www\smpsecr\my-inc.asp"--><!--#include virtual="\\n5200-2\iis7_www\f\s\mysite.com\www\smpsecr\my-inc.asp"--><!--#include file="//n5200-2/iis7_www/f/s/mysite.com/www/smpsecr/my-inc.asp"--><!--#include virtual="//n5200-2/iis7_www/f/s/mysite.com/www/smpsecr/my-inc.asp"--><!--#include file="/clientdata/iis7_www/f/s/mysite.com/www/smpsecr/my-inc.asp"--><!--#include virtual="/clientdata/iis7_www/f/s/mysite.com/www/smpsecr/my-inc.asp"--><!--#include file="\clientdata\iis7_www\f\s\mysite.com\www\smpsecr\my-inc.asp"--><!--#include virtual="\clientdata\iis7_www\f\s\mysite.com\www\smpsecr\my-inc.asp"-->
Just to be thorough.. I also tried these 8 tests.. but as I expected, they also all failed:
<!--#include file="/smpsecr/my-inc.asp"--><!--#include virtual="/smpsecr/my-inc.asp"--><!--#include file="\smpsecr\my-inc.asp"--><!--#include virtual="\smpsecr\my-inc.asp"--><!--#include file="smpsecr/my-inc.asp"--><!--#include virtual="smpsecr/my-inc.asp"--><!--#include file="smpsecr\my-inc.asp"--><!--#include virtual="smpsecr\my-inc.asp"-->
Can anyone give me another include format that could work with my setup. Or at the very least tell meif it is even possible to use absolute path with parents paths disabled? (As I mentioned earlier.. it appears that the server does not like anything with a / in front.. but I could be wrong!) Or maybe tell me the exact words I need to say to the hosting company's system support people to get them to tell me the correct absolute path?
Note: I am aware I can do a work around.. in that I could move the include file ( my-inc.asp) to be a child of the my-test.asp file - so that I can use a relative path in the include statement.. but I would prefer not to do that if possible! (The include statement using relative path downstream works, but I am porting over an old website, and this kind of include statement is used in over 200 files!)
Thanks!