include virtual

Results 1 to 2 of 2

Thread: include virtual

  1. #1
    Join Date
    Dec 1969

    Default include virtual

    Hi,<BR><BR>I&#039;ve just set up IIS for the first time and have found a problem with some web pages.<BR><BR>I have a include file which I copied from another server set up by someone else, the code is as follows<BR><BR>&#060;!-- #include virtual="scripts/"--&#062;<BR><BR>My directory is a virtual directory on IIS.<BR><BR>Now if I try to open the page in the browser which holds this line of code, I get the following error message<BR><BR>Error Type:<BR>Active Server Pages, ASP 0126 (0x80004005)<BR>The include file &#039;scripts/; was not found.<BR>/v/index.asp, line 3<BR><BR>Is there something I need to switch on in IIS to enable the virtual path to be used?<BR><BR>Appreciate any help<BR><BR>Regards<BR><BR>Darren.

  2. #2
    Join Date
    Dec 1969

    Default RE: include virtual

    I do not think that IIS is your problem.<BR>The thing is this:<BR>Scripts vDir is usually reffered to as "/scripts" + most of us(including myself) remove that vDir.<BR>In your case the index.asp is looking for this inc in "/v/scripts/". Why? because you did not put a "/" in the path, this makes the script look for the file/folder in the current folder instead of starting at the root level of the site.<BR><BR>What you need to do.<BR><BR>Figure out where you would like to have the INC.<BR>Point the path to that location and be cautios as to where you start your paths.<BR>In many cases you will have ASPs that will be located in different folders and will need access to the same INC but since the oroginal path didn&#039;t start at the root you can&#039;t just copy that 1 line from 1 script to another and expect it to work(the relative location of the inc to the ASP script will change).<BR>My suggestion would be to use "/", if you do you will be able to re-use that 1 line.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts