Microsoft IIS
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsSystem AdministrationMicrosoft IIS

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old April 23rd, 2005, 10:10 AM
ZLA ZLA is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 44 ZLA User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 2 m 30 sec
Reputation Power: 5
How to configure website to use INCLUDE VIRTUAL

I maintain a client's website which is hosted by another company. The website is written in ASP. I develop changes to the website locally on my Windows XP Pro computer running IIS 5.1.

There are a few places in the app where server side include files are used. Unfortunately, I have to use INCLUDE VIRTUAL for the production site and INCLUDE FILE when developing locally. Here are the two versions:

Code:
<!-- I use the following in DEV -->
<!-- #INCLUDE FILE="../include/ObjDef.inc" -->

<!-- I use the following in PROD -->
<!-- #INCLUDE VIRTUAL="/include/ObjDef.inc" -->


This means I have to remember to change the server side include statements before I upload changes to these files.

Can anyone tell me how I can configure my local machine to work with the INCLUDE VIRTUAL directive?

I saw a separate post that said "IIS wont let you call "Includes virtual" from any virtual directory that is not on the root." I have checked IIS and the path for my local copy of the website is listed as c:\inetpub\wwwroot\MySite. Is this incorrect?

Thank you in advance.

Reply With Quote
  #2  
Old April 23rd, 2005, 05:43 PM
Phoenix's Avatar
Phoenix Phoenix is offline
Web-Standards Evangelist
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Nov 2003
Posts: 1,522 Phoenix User rank is Corporal (100 - 500 Reputation Level)Phoenix User rank is Corporal (100 - 500 Reputation Level)Phoenix User rank is Corporal (100 - 500 Reputation Level)Phoenix User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 23 h 48 m 4 sec
Reputation Power: 9
Is "MySite" listed as an Application in IIS? If so, then include virtual will work because it has its own application scope and root.

Reply With Quote
  #3  
Old April 26th, 2005, 10:35 AM
ZLA ZLA is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 44 ZLA User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 2 m 30 sec
Reputation Power: 5
In IIS, MySite properties list "MySite" as the Application Name with a starting point of
Code:
<Default Web Site>\MySite


Is this correct? Should I try removing and adding back the application name?

By the way, the error information I get is as follows:

HTTP 500.100

Error Type:
Active Server Pages, ASP 0126 (0x80004005)
The include file '/include/ObjDef.inc' was not found.
/mywebsite/admin/mypage.asp, line 24


Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)

Page:
GET /mywebsite/admin/mypage.asp

Thanks.

Reply With Quote
  #4  
Old April 26th, 2005, 11:56 PM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 23 h 29 m 58 sec
Reputation Power: 181
If you're using a workstation version of windows (XP or whatever) you are restricted to a single website, so if you're using the box for development you can't duplicate the web structure of your target server. Each of your development websites will probably be virtual directories under your root web and when you transfer to the web server you'll probably run across many broken links and includes.

Easiest would be to use a server OS for development.
__________________
======
Doug G
======
I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain

Reply With Quote
  #5  
Old May 2nd, 2005, 06:01 PM
ZLA ZLA is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 44 ZLA User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 2 m 30 sec
Reputation Power: 5
You are correct; I am using XP Pro and my dev sites are all virtual directories under the root.

Since I only need to work with one web site at a time, is there any way to configure things so that the #Include virtual statement will work for a single dev site? For example, can I point the default web site's home directory (normally, c:\inetpub\wwwroot) to my dev site (say, c:\inetpub\wwwroot\MyDevSite)?

What are the consequences of such action?

Thank you in advance.

Reply With Quote
  #6  
Old May 2nd, 2005, 11:12 PM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 23 h 29 m 58 sec
Reputation Power: 181
Include virtual will always go from the root web of the website, so unfortunately you must specify the additional virtual directory in the include virtual url.

There is no simple workaround I know, other than use a server OS that supports multiple websites.

Reply With Quote
  #7  
Old May 3rd, 2005, 09:21 PM
solinent solinent is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2005
Posts: 70 solinent User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 h 25 sec
Reputation Power: 4
Just a suggestion, why don't you just use INCLUDE FILE on your server? As long as all the directories are the same, it would work the same. Unless your host doesn't allow INCLUDE FILE for some odd reason(I'm not that good with this stuff, but I know enough for the likes of me )

Reply With Quote
  #8  
Old May 3rd, 2005, 10:25 PM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 23 h 29 m 58 sec
Reputation Power: 181
It really doesn't matter if you use include file or include virtual if you're working on a non-server IIS that only allows a single website. You still have to deal with that pesky virtual directory folder (unless you put your includes outside the web and your host allows parent paths).

Reply With Quote
  #9  
Old May 5th, 2005, 10:46 AM
ZLA ZLA is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 44 ZLA User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 2 m 30 sec
Reputation Power: 5
When I've used Include File on the hosted production site, it doesn't work.

I am able to use Include Virtual on my dev server (XP Pro with IIS 5.1) as long as I set the default web site's home directory (normally, c:\inetpub\wwwroot) to my dev site (say, c:\inetpub\wwwroot\MyDevSite). This allows me to make a simple config change to my local IIS instead of changing all the source files that have the errant include statements.

Thanks for everyone's suggestions.

Reply With Quote
Reply

Viewing: ASP Free ForumsSystem AdministrationMicrosoft IIS > How to configure website to use INCLUDE VIRTUAL


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT