Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with virtual directory

Status
Not open for further replies.
Sep 25, 2002
159
US
Hello,

I recently created a virtual directory underneath a virtual server on a Windows 2003 server. Whenever I try to access files within the virtual directory via ASP code, I get an 'include file not found' error. I posted my question in the asp forum to verify my syntax, it looks ok. I'm thinking maybe I did not set up my virtual directory correctly? This is what I did.

1. Designated the physical directory 'includes' as a virtual directory called 'myFiles'
2. For the purposes of getting it to work I checked all of the options under 'Local Path' (script source acces, read, write, etc)
3. Execute Permissions is set to 'scripts and Executables'

I have placed both a regula .asp file and a .inc file within the virtual directory, both I cannot access.

Did I miss something? Do I have to reboot my server or something?
 
I recommend including a code snippet of the includes in the page you are trying to access and how far nested in the virtual directory (i.e. W3SVC/1/MyVirtualDir or is it further nested)?

Basically, the reference code within ASP page should read

<!--#include file="/myVirtualDir/myfile.inc"-->

You should be able to access the virtual directory by typing


Paul

Work on Windows, play on Linux.
 
Hi,

Here are all the different reference syntax I have tried to use:

<!-- #include file="\myFiles\SimpleChart2_1_VB.inc" -->
<!-- #include virtual="\myFiles\SimpleChart2_1_VB.inc" -->
<!-- #include virtual="/myFiles/SimpleChart2_1_VB.inc" -->

I cannot access the page via URL if I use the virtual directory in the URL, like this:


I get a 'Page cannot be found' error

but I CAN access it, if I use the physical name of the directory:

 
Based on the information you provided, I assume the .\Includes is defined as the virtual directory for myfiles and this is the location of your inc files and test.asp page. Therefore, the correct statement in the test.asp should read:

<!-- #include file="/SimpleChart2_1_VB.inc" -->

and you should be able to access the application by navigating to this:


Paul

Work on Windows, play on Linux.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top