We have a production web site - www.thesite.com - laid out as follows on IIS 6:
d:\Inetpub\wwwroot\default.asp
There are lots of subdirectories inside of WWWROOT including a cgi-bin directory that contains a simple ASP Visitor Counter script. This cgi-bin directory sits at
D:\InetPub\wwwroot\cgi-bin\filename.ext
We also have a staging site (for testing web content before posting to the real site) located here.
d:\Inetpub\staging\
This site contains an exact duplicate of the production web site. This staging site exists just outside of the production web site folder (D:\Inetpub\Staging) and is accessible to the main web page via a defined virtual directory on the main web site. That means you can get to the staging site by typing
www.thesite.com/staging/default.htm
When we place the cgi-bin directory inside the staging directory (so that it sits on the same level or below the web page that's using it) and use an Include File command, everything works fine. The default web page sees the script, and executes it perfectly.
The problem is that we need to put this script (and this Include command) in a bunch of web pages that sit in a whole slew of subfolders below staging. Since we don't want to paste a cgi-bin directory off of every folder, we tried to use a Include virtual command as follows:
<!--#Include virtual="/staging/cgi-bin/count.asp"-->
Looking at the Home Tab under the Web site properties, the home directory is
D:\Inetpub/wwwroot.
That should then mean that the Include Virtual command starts in this WWWROOT directory, enters staging/cgi-bin/ and should then find the asp script. Again, since staging exists outside of the WWWROOT folder, we had to create a virtual directory, so that it appears to the web site as if the staging folder is inside the WWWROOT folder.
For some reason, we get the following error when we try to access the page that harbors the Include statement.
Microsoft VBScript runtime error '800a004c'
Path not found
/staging/cgi-bin/count.asp, line 40
We went into the Properties Page of the main web site, clicked on the home tab, configuration, and options, and enabled Parent Paths. We then stopped and restarted the web page. No change. We still get the error.
Why can't the web page see the script? I've been bashing my head against the wall for 9 hours on this (with a screaming manager right outside the door).
Thanks
Roger