Connecting Tech Pros Worldwide Help | Site Map
 
 
LinkBack Thread Tools Search this Thread
  #1  
Old September 3rd, 2008, 09:17 PM
rockdale
Guest
 
Posts: n/a
Default 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" --
Quote:
>
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




  #2  
Old September 3rd, 2008, 10:15 PM
Evertjan.
Guest
 
Posts: n/a
Default Re: include virtual in virtual directory?

rockdale wrote on 03 sep 2008 in
microsoft.public.inetserver.asp.general:
Quote:
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"
--
Quote:
>>
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)
  #3  
Old September 4th, 2008, 09:25 AM
Anthony Jones
Guest
 
Posts: n/a
Default Re: include virtual in virtual directory?

"rockdale" <rockdale.green@gmail.comwrote in message
news:3e9ef259-4d0b-43dd-b082-a39a3028565b@q26g2000prq.googlegroups.com...
Quote:
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" --
Quote:
>>
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

  #4  
Old September 4th, 2008, 03:45 PM
rockdale
Guest
 
Posts: n/a
Default Re: include virtual in virtual directory?

Are you aware that IIS can differentiate between websites based on the host
Quote:
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
  #5  
Old September 4th, 2008, 04:05 PM
Anthony Jones
Guest
 
Posts: n/a
Default Re: include virtual in virtual directory?

"rockdale" <rockdale.green@gmail.comwrote in message
news:b01e7a92-19f5-405e-aff7-101baeca1518@i20g2000prf.googlegroups.com...
Quote:
Quote:
>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.yourdomain.com; beta.yourdomain.com;
gamma.yourdomain.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.yourdomain.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

  #6  
Old September 4th, 2008, 04:35 PM
rockdale
Guest
 
Posts: n/a
Default Re: include virtual in virtual directory?

Thanks, Now I understand.

On Sep 4, 10:55*am, "Anthony Jones" <AnthonyWJo...@yadayadayada.com>
wrote:
Quote:
"rockdale" <rockdale.gr...@gmail.comwrote in message
>
news:b01e7a92-19f5-405e-aff7-101baeca1518@i20g2000prf.googlegroups.com...
>
Quote:
Quote:
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.
>
Quote:
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.yourdomain.com; beta.yourdomain.com;
gamma.yourdomain.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.yourdomain.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.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
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 205,338 network members.