Helpful Information
 
 
Category: ASP Programming
Virtual Includes

On one of my asp sites I want to use virtual includes so that it will work the same locally for testing as on the server.

the site is on IIS on WinXP Professional, a folder under the main site. I made it a virtual directory. However if I put:
<!-- #INCLUDE VIRTUAL="/footer.asp"-->
it doesn't work, I still have to put
<!-- #INCLUDE VIRTUAL="/site_folder/footer.asp"-->
how can I make it work like the document root? Is there a URL I should be using as opposed to localhost/site_folder/ ?

thanks!

I think you must create virtual directory in your IIS for your site. In this way <!-- #INCLUDE VIRTUAL="/footer.asp"--> must work correctly.

Good Luck!;)

__________________________________
With best regards,
Julia Pavlova
Programmer
Rapid Internet Development
AlarIT Inc.
URL: http://www.alarit.com

I did create a virtual directory but it didnt change anything. :confused:

I might be able to help, but I need more info.

How is your IIS setup specifically where does it point to on the hard drive for that site ie: C:\inetpub\wwwroot\mysite

The next thing I need to know is were does your include file reside ie: C:\inetpub\wwwroot\mysite\includes

Also you don't need virtual directories for this to work properly, I personal try to avoid using virtual directories all together.

Hello,

IIS point to C:\server for the main web folder, and for this site C:\server\TurboMaster.

so for testing locally I must use

<!-- #INCLUDE VIRTUAL="/TurboMaster/footer.asp"-->

and on my isp web space it's:

<!-- #INCLUDE VIRTUAL="/footer.asp"-->

I would like it the same locally as it does on my ISP but I can't make Turbomaster the root folder for the whole server locally.

hi. first time writer, long time reader..

if i get your problem correctly, your sub-site runs in a sub folder (virtual that is) on your local server and in the main root (/) folder on the isp server. right?

should i assume the whole code of your website that runs on your isp actually runs within this local virtual directory?

sounds like what i'm using.

have you tried using simply:
<!-- #INCLUDE FILE="footer.asp"-->

since there is no reference to either root or virtual directory, it
assumes to look for footer.asp in the same folder where the include directive was found. That would make it work on both
local and isp servers..

just a thought... does it help? :confused:


ben[dog]

woah this post is from 2002! Thanks for the response..

I converted that site to php a couple years ago. :D

oh yeaaaahh.. now that you say it, it does says 2002 doesnt it! :rolleyes:
well, so much for my first reply to this forum...

my apologies for waking up ancient thought..

you see, it isnt my fault i was born french :p

ben[dog]


woah this post is from 2002! Thanks for the response..

I converted that site to php a couple years ago. :D










privacy (GDPR)