Can't include virtual directory

Discussion in 'ASP General' started by Jonathan Attree, Jun 18, 2008.

  1. Hi

    I have just taken over management of a web site, many pages of which contain
    the line:
    <!--#include virtual="/admin/Includes/conn_Login.asp" -->
    When I try to load this page (login.asp) I get the error:

    Page cannot be displayed
    Active Server Pages, ASP 0126 (0x80004005)
    The include file '/admin/Includes/conn_Login.asp' was not found.
    /CECO/admin/Home/login.asp, line 10

    I realise that I have to create a virtual directory but am not sure how to
    do this.
    Full path to file is:
    C:\Inetpub\wwwroot\CECO\admin\Home\login.asp

    Any help much appreciated.
    Thanks
    Jonathan Attree
     
    Jonathan Attree, Jun 18, 2008
    #1
    1. Advertising

  2. "Jon Paal" wrote:

    > make sure the root path is correct.
    >
    > try :
    >
    > <!--#include virtual="/ceco/admin/Includes/conn_Login.asp" -->
    >
    >
    >

    Thanks for the reply.
    Perhaps I should have said that the site is on a shared host and
    <!--#include virtual="/admin/Includes/conn_Login.asp" -->
    works on the shared server but not on my local machine which is what i'm
    trying to acheive so that I can develop the site further.

    Jonathan Attree
     
    Jonathan Attree, Jun 18, 2008
    #2
    1. Advertising

  3. "Jonathan Attree" <> wrote in
    message news:...
    > Hi
    >
    > I have just taken over management of a web site, many pages of which

    contain
    > the line:
    > <!--#include virtual="/admin/Includes/conn_Login.asp" -->
    > When I try to load this page (login.asp) I get the error:
    >
    > Page cannot be displayed
    > Active Server Pages, ASP 0126 (0x80004005)
    > The include file '/admin/Includes/conn_Login.asp' was not found.
    > /CECO/admin/Home/login.asp, line 10
    >
    > I realise that I have to create a virtual directory but am not sure how to
    > do this.
    > Full path to file is:
    > C:\Inetpub\wwwroot\CECO\admin\Home\login.asp
    >


    Have actually got a copy of the physical files found in the /admin folder
    somewhere on you local machine or available on a network file share


    --
    Anthony Jones - MVP ASP/ASP.NET
     
    Anthony Jones, Jun 19, 2008
    #3
  4. Jonathan wrote on Wed, 18 Jun 2008 11:22:05 -0700:

    > "Jon Paal" wrote:


    >> make sure the root path is correct.


    >> try :


    >> <!--#include virtual="/ceco/admin/Includes/conn_Login.asp" -->




    > Thanks for the reply.
    > Perhaps I should have said that the site is on a shared host and
    > <!--#include virtual="/admin/Includes/conn_Login.asp" -->
    > works on the shared server but not on my local machine which is what
    > i'm trying to acheive so that I can develop the site further.


    > Jonathan Attree



    It seems then that your problem is that on the shared host the files are in
    the site "root" directory, but on your development machine you've put them
    in a folder called CECO in your "root". What would likely work is for you to
    change your site settings so that C:\Inetpub\wwwroot\CECO is the path to the
    root of the site.

    --
    Dan
     
    Daniel Crichton, Jun 19, 2008
    #4
  5. "Anthony Jones" wrote:

    > "Jonathan Attree" <> wrote in
    > message news:...
    > > Hi
    > >
    > > I have just taken over management of a web site, many pages of which

    > contain
    > > the line:
    > > <!--#include virtual="/admin/Includes/conn_Login.asp" -->
    > > When I try to load this page (login.asp) I get the error:
    > >
    > > Page cannot be displayed
    > > Active Server Pages, ASP 0126 (0x80004005)
    > > The include file '/admin/Includes/conn_Login.asp' was not found.
    > > /CECO/admin/Home/login.asp, line 10
    > >
    > > I realise that I have to create a virtual directory but am not sure how to
    > > do this.
    > > Full path to file is:
    > > C:\Inetpub\wwwroot\CECO\admin\Home\login.asp
    > >

    >
    > Have actually got a copy of the physical files found in the /admin folder
    > somewhere on you local machine or available on a network file share
    >
    >
    > --
    > Anthony Jones - MVP ASP/ASP.NET
    >
    >
    >


    Thanks again.
    Yes there is a a copy of the physical files in
    C:\Inetpub\wwwroot\CECO\admin

    The file(s) that the #include command is called from are in:
    C:\Inetpub\wwwroot\CECO\Home
    so I need to go up one directory and down to 'admin'. I can make it work by
    changing the command to
    <!--#include file="../admin/Includes/conn_Login.asp" -->
    on my local machine but the shared host doesn't allow the '../'.

    > What would likely work is for you to
    > change your site settings so that C:\Inetpub\wwwroot\CECO is the path to the
    > root of the site.


    C:\Inetpub\wwwroot\CECO\index.asp is the site home page so is
    C:\Inetpub\wwwroot\CECO not the root path of the site?

    All I'm trying to do is avoid having to change these commands every time I
    need to edit a page ( and then forgetting to change them back again!)

    Jonathan Attree
     
    Jonathan Attree, Jun 19, 2008
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jack Wright
    Replies:
    1
    Views:
    482
    sonikchopra
    Apr 19, 2005
  2. Steve Singer
    Replies:
    0
    Views:
    556
    Steve Singer
    Feb 15, 2005
  3. =?Utf-8?B?SmVmZiBCZWVt?=

    physical path to virtual path under virtual directory

    =?Utf-8?B?SmVmZiBCZWVt?=, Aug 1, 2007, in forum: ASP .Net
    Replies:
    4
    Views:
    1,083
    Eliyahu Goldin
    Aug 1, 2007
  4. Andreas Bogenberger
    Replies:
    3
    Views:
    975
    Andreas Bogenberger
    Feb 22, 2008
  5. rockdale

    include virtual in virtual directory?

    rockdale, Sep 3, 2008, in forum: ASP General
    Replies:
    3
    Views:
    462
    rockdale
    Sep 4, 2008
Loading...

Share This Page