473,748 Members | 5,232 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

include virtual in virtual directory?

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
ports or ip for these websites. SO we create 3 virtual directory under
the default website, but we got problems because the asp pages include
common code in other asp files and the original developer using
include virtual to include the common code asp files.

The error I got is :

HTTP 500.100 - Internal server error: ASP error.
Internet Information Services

--------------------------------------------------------------------------------

Technical Information (for support personnel)

Error Type:
Active Server Pages, ASP 0126 (0x80004005)
The include file '/top.asp' was not found.
/website_test/index.asp, line 1

Browser Type:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; .NET CLR
1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR
3.5.21022)
The source code in the index.asp is <!-- #INCLUDE VIRTUAL="/top.asp" --
>
and the top.asp is under the same directory with index.asp.

-----------------------------------

If I create website then it works fine, the top.asp is found and the
page shows properly.

I know one way is the change all include virtual to include file, but
that's too much workload considering the I am not original developer
and they have the include virtual everywhere.

I kind know why this error occurred, it is because I create the
virtual directory, so the include virtual="/top.asp" should changed to
include virtual="/website_test/top.asp" since the wwwroot is not the
root anymore. or my understanding is wrong.

Anybody can give me a hand?

Thanks in advance
-rockdale

Sep 3 '08 #1
5 3827
rockdale wrote on 03 sep 2008 in
microsoft.publi c.inetserver.as p.general:
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
ports or ip for these websites. SO we create 3 virtual directory under
the default website, but we got problems because the asp pages include
common code in other asp files and the original developer using
include virtual to include the common code asp files.

The error I got is :

HTTP 500.100 - Internal server error: ASP error.
Internet Information Services

-----------------------------------------------------------------------
---------

Technical Information (for support personnel)

Error Type:
Active Server Pages, ASP 0126 (0x80004005)
The include file '/top.asp' was not found.
/website_test/index.asp, line 1

Browser Type:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; .NET CLR
1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR
3.5.21022)
The source code in the index.asp is <!-- #INCLUDE VIRTUAL="/top.asp"
--
>>
and the top.asp is under the same directory with index.asp.

-----------------------------------

If I create website then it works fine, the top.asp is found and the
page shows properly.

I know one way is the change all include virtual to include file, but
that's too much workload considering the I am not original developer
and they have the include virtual everywhere.

I kind know why this error occurred, it is because I create the
virtual directory, so the include virtual="/top.asp" should changed to
include virtual="/website_test/top.asp" since the wwwroot is not the
root anymore. or my understanding is wrong.

Anybody can give me a hand?
methinks:

Just copy the top.asp to the several places where the virtual includes
expect them.

Or, if top.asp would be changed regularly,
have an include to the "master" top.asp in the other top.asp-s.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Sep 3 '08 #2
"rockdale" <ro************ @gmail.comwrote in message
news:3e******** *************** ***********@q26 g2000prq.google groups.com...
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
ports or ip for these websites. SO we create 3 virtual directory under
the default website, but we got problems because the asp pages include
common code in other asp files and the original developer using
include virtual to include the common code asp files.

The error I got is :

HTTP 500.100 - Internal server error: ASP error.
Internet Information Services

--------------------------------------------------------------------------------

Technical Information (for support personnel)

Error Type:
Active Server Pages, ASP 0126 (0x80004005)
The include file '/top.asp' was not found.
/website_test/index.asp, line 1

Browser Type:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; .NET CLR
1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR
3.5.21022)
The source code in the index.asp is <!-- #INCLUDE VIRTUAL="/top.asp" --
>>
and the top.asp is under the same directory with index.asp.

-----------------------------------

If I create website then it works fine, the top.asp is found and the
page shows properly.

I know one way is the change all include virtual to include file, but
that's too much workload considering the I am not original developer
and they have the include virtual everywhere.

I kind know why this error occurred, it is because I create the
virtual directory, so the include virtual="/top.asp" should changed to
include virtual="/website_test/top.asp" since the wwwroot is not the
root anymore. or my understanding is wrong.

Anybody can give me a hand?
Are you aware that IIS can differentiate between websites based on the host
header alone? IOW, multiple websites can be served on the same IP address
through the same port.

You might find it is a lot easier to create three separate web sites and add
three new hostnames to your DNS. Then assign each of the fully quailified
host names to each of the web sites.
--
Anthony Jones - MVP ASP/ASP.NET

Sep 4 '08 #3
Are you aware that IIS can differentiate between websites based on the host
header alone? IOW, multiple websites can be served on the same IP address
through the same port.
I did not know about. I thought we need to assign either different IP
address or open different port for each website.
Can you be more specific or point me to related web resources?

Again, thanks a lot.
-rockdale
Sep 4 '08 #4
"rockdale" <ro************ @gmail.comwrote in message
news:b0******** *************** ***********@i20 g2000prf.google groups.com...
>Are you aware that IIS can differentiate between websites based on the
host
header alone? IOW, multiple websites can be served on the same IP
address
through the same port.

I did not know about. I thought we need to assign either different IP
address or open different port for each website.
Can you be more specific or point me to related web resources?
Lets say you had the websites alpha.yourdomai n.com; beta.yourdomain .com;
gamma.yourdomai n.com.

You would have alpha, beta, gamma configured in DNS to point to your web
server. If you manage the domain yourself you would use a CNAME entry to
point each at the servers computer name. If someone else manages the DNS
server for yourdomain just have them create A records pointing all to the
same IP addresss, that of your machine.

In IIS create a new website, the wizard wants a description call it 'Alpha'.
On the next wizard page leave IP address set to All Unassigned and port to
80 however enter alpha.yourdomai n.com in the host header box. The next page
enter the file path to Alphas web files. Complete the wizard.

Repeat for Beta and Gamma. Now a visitor to http://alpha.yourdomain.com/
will be directed to the correct web service.

Note don't re-use the default site, disable it.

--
Anthony Jones - MVP ASP/ASP.NET

Sep 4 '08 #5
Thanks, Now I understand.

On Sep 4, 10:55*am, "Anthony Jones" <AnthonyWJo...@ yadayadayada.co m>
wrote:
"rockdale" <rockdale.gr... @gmail.comwrote in message

news:b0******** *************** ***********@i20 g2000prf.google groups.com...
Are you aware that IIS can differentiate between websites based on the
host
header alone? *IOW, multiple websites can be served on the same IP
address
through the same port.
I did not know about. I thought we need to assign either different IP
address or open different port for each website.
Can you be more specific or point me to related web resources?

Lets say you had the websites *alpha.yourdoma in.com; beta.yourdomain .com;
gamma.yourdomai n.com.

You would have alpha, beta, gamma configured in DNS to point to your web
server. If you manage the domain yourself you would use a CNAME entry to
point each at the servers computer name. *If someone else manages the DNS
server for yourdomain just have them create A records pointing all to the
same IP addresss, that of your machine.

In IIS create a new website, the wizard wants a description call it 'Alpha'.
On the next wizard page leave IP address set to All Unassigned and port to
80 however enter alpha.yourdomai n.com in the host header box. *The nextpage
enter the file path to Alphas web files. Complete the wizard.

Repeat for Beta and Gamma. *Now a visitor tohttp://alpha.yourdomai n.com/
will be directed to the correct web service.

Note don't re-use the default site, disable it.

--
Anthony Jones - MVP ASP/ASP.NET
Sep 4 '08 #6

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

Similar topics

13
2597
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
6691
by: Charts | last post by:
I recently upgraded development web server to Windows 2003. I have ASP file contains following line for include file <!--#include File="../Include/adovbs.inc"-- This ASP file worked fine before. When I ran this file under Windows 2003, I got following error message The include file “Include/adovbs.inc” cannot contain ‘…’ to indicate the parent directory. I changed to following lin <!--#include File="my virtual...
3
13359
by: Zenobia | last post by:
I copy an application to wwwroot: wwwroot +--- myApp +--- common | +--- images | default.asp global.asa
9
9424
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 App/Options tab. The include files are being called as <!-- #include virtual="../includes/file.inc" --> <!-- #include virtual="../includes/script.asp" --> If I remove the parent path call it works just fine. I
2
3228
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 being loaded as in dim myXSLT as new XslTransform() myXSLT.load("scripts/clnt.home.body.xslt") The load craps out when I change the xsl:include, tried all of the following
2
4639
by: WisTex | last post by:
I've come across a very weird problem. Virtual includes work on all my ASP pages on the entire website, including those in subdirectories, yet they won't work on a particular page I created, even though the virtual include statement is copy & pasted exactly as it appears on the working pages. What would cause virtual includes to work in one page on a website, but not on another? Error Message: Microsoft VBScript runtime error...
10
18917
by: Eric | last post by:
Hello, I have some server side includes on a Classic asp page that look something like: <!-- #include virtual="/includes/file1.asp"--> <!-- #include virtual="/includes/file2.asp" --> <!-- #include virtual="/includes/file3.asp" --> <!-- #include virtual="/includes/file4.asp" --> <!-- #include virtual="/includes/file5.asp" -->
19
2165
by: Earl Partridge | last post by:
FP 2000 I have a single Include file that I want to use on multiple sites. I'm trying to use the following (or some variation) but can't make it work. <!--#INCLUDE FILE="www.myothersite.com/FavLinks.inc"--> Earl
5
4585
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 www.server-a.com/virtual-dir/some_script.asp, using the following include: <!--#include file="some_include.asp"---> Going to www.server-a.com/virtual-dir/some_script.asp works perfectly fine
0
8991
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
1
9325
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8244
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6796
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4607
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4876
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3315
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2787
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.