473,382 Members | 1,204 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Can't include virtual directory

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
Jun 27 '08 #1
6 3974
make sure the root path is correct.

try :

<!--#include virtual="/ceco/admin/Includes/conn_Login.asp" -->
Jun 27 '08 #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
Jun 27 '08 #3
It's still the same problem, the path is not valid. The webhost path is not necessarily going to work on your local machine .

check your IIS setting for the local machine website and verify the root path of your local website....



Jun 27 '08 #4
"Jonathan Attree" <Jo************@discussions.microsoft.comwrote in
message news:EC**********************************@microsof t.com...
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
Jun 27 '08 #5
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
Jun 27 '08 #6


"Anthony Jones" wrote:
"Jonathan Attree" <Jo************@discussions.microsoft.comwrote in
message news:EC**********************************@microsof t.com...
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
Jun 27 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Niels Sloth | last post by:
Hi I have 9 asp-sites on a Win2003 server, and would like to use the same include file, but it does not work. The path for the servers default website (which is not where the problem is) is...
13
by: Bryan Harrington | last post by:
Hello all.. I'm working on an application that I'd like to use some shared files. Right now my directory structure is: / (root) .../Shared/ .../Reports/ .../Tools/
9
by: JR | last post by:
Hi, I'm migrating my website to an IIS 6.0 server and all the asp pages work fine except for the ones that reference include files, even though I have "Enable parent paths" enabled in the...
2
by: Keith Chadwick | last post by:
I have been running some tests with regards to xsl:include and xsl:import with the same results on both and I am wondering if someone can explain this behavior to me! First off the xslt file is...
8
by: Alex | last post by:
Hi, I have noticed that in an aspx page <!--#include virtual="Home.htm"--> acts the same as <!--#include File="Home.htm"--> when I am NOT in the root diectory of the site (I am aware that...
6
by: Gideon de Swardt | last post by:
I am trying to do a server side transformation using an xsl:include in my xslt stylesheet. The include stylesheet is stored /Library/abo.Library.xslt and is included in multiple xslts, one example...
4
by: david | last post by:
I basically use the following code to display the directory and file names in the WWWROOT, but can not show the virtual directory. ---- Dim path As String = Server.MapPath(x) Dim di As...
7
by: Rob | last post by:
This actually compiles and works but it doesn't seem like the best code, so I was wondering is there another way to do this? template <typename Tvector<T>* addDepth(T) { return new vector<T>;...
5
by: chris_peoples | last post by:
I have a virtual directory, lets say it exists at www.server-a.com/virtual-dir/ virtual-dir points to another directory on another server using the unc path: \\server-b\main-dir I have a file at...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.