Parent directory dilemma

B

berkyj

Hi all,

Currently building a web site in ASP/VBScript and have a number of
include files.

When I make the call to it via <%!-- include file="../blah/blah.inc"
--%> I get the standard Windows 2003 Server error message about the
parent paths thing (no probs there as I have them switched off) so I
altered my call to the include file to use the virtual include (ie
....include virtual="/blah/blah.inc"... etc) and this works fine if I
view the web site outside of my local network (ie www.domainname.com),
however, when I view it from within my local network whilst i'm
developing it (ie
http://servername/rootfoldername/subfolder/pagename.asp) it doesn't
like it. It's only when I alter the include statement to include the
rootfoldername from the local address (which is the folder is resides
in in WWWROOT) that it now works, however, access from the outside
world will not...

How can I get it so these two can live in harmony as I don't want to
have to change all the include calls each time I work on it at
different locations (sometimes I work on it from within the local
network, sometimes externally)?

Cheers muchly,

Bj
 
D

Daniel Crichton

Hi all,

Currently building a web site in ASP/VBScript and have a number of
include files.

When I make the call to it via <%!-- include file="../blah/blah.inc"
--%> I get the standard Windows 2003 Server error message about the
parent paths thing (no probs there as I have them switched off) so I
altered my call to the include file to use the virtual include (ie
...include virtual="/blah/blah.inc"... etc) and this works fine if I
view the web site outside of my local network (ie www.domainname.com),
however, when I view it from within my local network whilst i'm
developing it (ie
http://servername/rootfoldername/subfolder/pagename.asp) it doesn't
like it. It's only when I alter the include statement to include the
rootfoldername from the local address (which is the folder is resides
in in WWWROOT) that it now works, however, access from the outside
world will not...

How can I get it so these two can live in harmony as I don't want to
have to change all the include calls each time I work on it at
different locations (sometimes I work on it from within the local
network, sometimes externally)?

Cheers muchly,

Bj


I'm assuming you're using IIS on XP for development, so can only use one web
site. Why not just change the mapping in IIS to the appropriate site that
you're working on? So when you want work on this site, change the IIS root
to point to /rootfoldername and then your include virtual paths will match
those on the live server.

Dan
 
M

Mike Brind

Daniel said:
I'm assuming you're using IIS on XP for development, so can only use one web
site.

Not strictly true. This little toy allows you to create multiple sites
under IIS on XP...

http://jetstat.com/iisadmin/

....but you can only have one running at a time. Which is ordinarily
fine for development work :)
 
B

berkyj

Hi guys,

Thanks for tips, will look into them both.

I write and develop the code on a Windows XP box but the site live site
and testing are one in the same and that is a Win2K3 Server as it is
also the web server that is hosting the site. So once i've made changes
to the code I upload it to the web server to test the functionality
(site isn't "live" yet so no dramas about it being seen).

Cheers
Bj
 
D

Daniel Crichton

Mike wrote on 5 Sep 2006 03:04:35 -0700:
Not strictly true. This little toy allows you to create multiple sites
under IIS on XP...

http://jetstat.com/iisadmin/

...but you can only have one running at a time. Which is ordinarily
fine for development work :)


Ah, but doesn't that tool just allow you to switch the XP IIS settings
without all the manual work, and so doesn't actually bypass the inherent XP
IIS restriction that only allows it to run one site at a time.

Dan
 
M

Mike Brind

Daniel said:
Mike wrote on 5 Sep 2006 03:04:35 -0700:



Ah, but doesn't that tool just allow you to switch the XP IIS settings
without all the manual work, and so doesn't actually bypass the inherent XP
IIS restriction that only allows it to run one site at a time.

Isn't that the same as:

?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top