473,228 Members | 1,617 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,228 software developers and data experts.

How does #Include virtual work?

I copy an application to wwwroot:

wwwroot
+--- myApp
+--- common
|
+--- images
|
default.asp
global.asa

I create a virtual directory to point to it. To do that I open
IIS plugin, Navigate to "Default Web Site", right context menu,
New, Virtual Directory, Next, Alias = "myApp", Next, Directory =
"C:\Inetpub\wwwroot\myApp", Next, Next, Finish.

At the top of default.asp is the line:

<!--#Include virtual="/common/setupadrot.asp" -->

But I get an error.

Active Server Pages, ASP 0126 (0x80004005)
The include file '/common/setupadrot.asp' was not found.
/myApp/Default.asp, line 6

What is the correct way to use #Include virtual with a web
directory set up like this? Where does the app think the root
is and how can I find out where it thinks the application's
web-root is located.

None of these work.
<!--#Include virtual="common/setupadrot.asp" -->
<!--#Include virtual="/common/setupadrot.asp" -->
<!--#Include virtual="./common/setupadrot.asp" -->
<!--#Include virtual="../common/setupadrot.asp" -->
<!--#Include virtual="/../common/setupadrot.asp" -->

This will work OK:
<!--#Include virtual="myApp/common/setupadrot.asp" -->

but the problem is I don't want to include the name of the root,
"myApp", because this may change at some time in the future.

Will I have to use
<!--#Include virtual="myApp/common/setupadrot.asp" -->
during development and change it to:
<!--#Include virtual="/common/setupadrot.asp" -->
when I deploy it?

Naturally I need to have several distinct web applications in
wwwroot. Using #Include file is out of the question.
Jul 19 '05 #1
3 13308

See this:

http://www.asptutorial.info/learn/su...ne_include.asp
John Cesta

---------------------------------
The CPU Checker - Maximize Server Uptime
LogFileManager - The only IIS Logfile Management Tool
DomainReportIt PRO - Helps Convert IIS Installs
http://www.serverautomationtools.com
On Tue, 29 Jun 2004 13:37:21 +0100, Zenobia
<6.**********@spamgourmet.com> wrote:
I copy an application to wwwroot:

wwwroot
+--- myApp
+--- common
|
+--- images
|
default.asp
global.asa

I create a virtual directory to point to it. To do that I open
IIS plugin, Navigate to "Default Web Site", right context menu,
New, Virtual Directory, Next, Alias = "myApp", Next, Directory =
"C:\Inetpub\wwwroot\myApp", Next, Next, Finish.

At the top of default.asp is the line:

<!--#Include virtual="/common/setupadrot.asp" -->

But I get an error.

Active Server Pages, ASP 0126 (0x80004005)
The include file '/common/setupadrot.asp' was not found.
/myApp/Default.asp, line 6

What is the correct way to use #Include virtual with a web
directory set up like this? Where does the app think the root
is and how can I find out where it thinks the application's
web-root is located.

None of these work.
<!--#Include virtual="common/setupadrot.asp" -->
<!--#Include virtual="/common/setupadrot.asp" -->
<!--#Include virtual="./common/setupadrot.asp" -->
<!--#Include virtual="../common/setupadrot.asp" -->
<!--#Include virtual="/../common/setupadrot.asp" -->

This will work OK:
<!--#Include virtual="myApp/common/setupadrot.asp" -->

but the problem is I don't want to include the name of the root,
"myApp", because this may change at some time in the future.

Will I have to use
<!--#Include virtual="myApp/common/setupadrot.asp" -->
during development and change it to:
<!--#Include virtual="/common/setupadrot.asp" -->
when I deploy it?

Naturally I need to have several distinct web applications in
wwwroot. Using #Include file is out of the question.


Jul 19 '05 #2
why dont you just make a virtual directory that is common then you can point
it wherever you want and wont have to recode?
"Zenobia" <6.**********@spamgourmet.com> wrote in message
news:hv********************************@4ax.com...
I copy an application to wwwroot:

wwwroot
+--- myApp
+--- common
|
+--- images
|
default.asp
global.asa

I create a virtual directory to point to it. To do that I open
IIS plugin, Navigate to "Default Web Site", right context menu,
New, Virtual Directory, Next, Alias = "myApp", Next, Directory =
"C:\Inetpub\wwwroot\myApp", Next, Next, Finish.

At the top of default.asp is the line:

<!--#Include virtual="/common/setupadrot.asp" -->

But I get an error.

Active Server Pages, ASP 0126 (0x80004005)
The include file '/common/setupadrot.asp' was not found.
/myApp/Default.asp, line 6

What is the correct way to use #Include virtual with a web
directory set up like this? Where does the app think the root
is and how can I find out where it thinks the application's
web-root is located.

None of these work.
<!--#Include virtual="common/setupadrot.asp" -->
<!--#Include virtual="/common/setupadrot.asp" -->
<!--#Include virtual="./common/setupadrot.asp" -->
<!--#Include virtual="../common/setupadrot.asp" -->
<!--#Include virtual="/../common/setupadrot.asp" -->

This will work OK:
<!--#Include virtual="myApp/common/setupadrot.asp" -->

but the problem is I don't want to include the name of the root,
"myApp", because this may change at some time in the future.

Will I have to use
<!--#Include virtual="myApp/common/setupadrot.asp" -->
during development and change it to:
<!--#Include virtual="/common/setupadrot.asp" -->
when I deploy it?

Naturally I need to have several distinct web applications in
wwwroot. Using #Include file is out of the question.

Jul 19 '05 #3
> Will I have to use
<!--#Include virtual="myApp/common/setupadrot.asp" -->
during development and change it to:
<!--#Include virtual="/common/setupadrot.asp" -->
when I deploy it?

Naturally I need to have several distinct web applications in
wwwroot. Using #Include file is out of the question.


If common is inside myApp, then the first way is the only way to do it.

Just put common under the root of your website instead of inside your app folder.
Jul 19 '05 #4

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

Similar topics

2
by: andy | last post by:
i am using dreamweaver to create an asp page. I have the following code incorporated on the page. :- <!--#include virtual="/includes/meta.asp" --> But when i preview it asp produces the...
2
by: Greg | last post by:
I'm new to html and web coding, this is a simple one - appreciate your help! I'm attempting to get my browser bar links to reside in a single .asp file to avoid multiple additions to pages when...
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/
3
by: rd | last post by:
I wanted to do this: <!-- #include virtual = <%=request("page")%> --> But, that's doesn't work. Help?! I have a static "container" asp page. Based on a querystring variable, I want the...
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: =?Utf-8?B?Sm9uYXRoYW4gQXR0cmVl?= | last post by:
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...
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...
5
by: rockdale | last post by:
Hi, all: Hope somebody can solve this problem for me. We are migrating 3 asp website into IIS 6.0 on a server 2003. we do not want to create 3 website since we do not want to acquire different...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

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.