473,396 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Parent directory dilemma

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

Sep 5 '06 #1
5 1910
be****@gmail.com wrote on 4 Sep 2006 21:44:07 -0700:
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
Sep 5 '06 #2

Daniel Crichton wrote:
be****@gmail.com wrote on 4 Sep 2006 21:44:07 -0700:
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.
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 :)

--
Mike Brind

Sep 5 '06 #3
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
Mike Brind wrote:
Daniel Crichton wrote:
be****@gmail.com wrote on 4 Sep 2006 21:44:07 -0700:
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.

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 :)

--
Mike Brind
Sep 5 '06 #4
Mike wrote on 5 Sep 2006 03:04:35 -0700:
>
Daniel Crichton wrote:
>be****@gmail.com wrote on 4 Sep 2006 21:44:07 -0700:
>>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.

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
Sep 5 '06 #5

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

Daniel Crichton wrote:
be****@gmail.com wrote on 4 Sep 2006 21:44:07 -0700:

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.
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.
Isn't that the same as:
...but you can only have one running at a time. Which is ordinarily
fine for development work :)
?

--
Mike Brind

Sep 5 '06 #6

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

Similar topics

3
by: Golawala, Moiz M (GE Infrastructure) | last post by:
Hi all, What I am trying to do is write some generic code where I can get the path of the parent directory. for example if current working directory is 'Z:\\dirA\\Parent\\Child' I want to get...
2
by: Marvin | last post by:
Hi I get this message. The Include file '../main.asp' cannot contain '..' to indicate the parent directory. I think it is refering to the fact that I have a file called communication.asp,...
25
by: Steve Jorgensen | last post by:
Yup, Steve's full of tips, but hey, it makes him feel important, right? Ok, here goes. I've been trying to improve encapsulation by putting code in the same object as the stuff it affects, so I...
5
by: J'son | last post by:
<REPOSTED> Guys, I need to build a web intranet application that can automatically create a user account when a new user registers on the site. The user account will be on the web server,...
3
by: BobAchgill | last post by:
Is this the right way to get to back up to the immediate parent subdirectory? Directory.GetParent("\") or this? Directory.GetParent("..") Or this?
4
by: Paulers | last post by:
hello. how do I get the file's parent directory name out of a path like this? c:\test\myDirectory\file.txt Im looking to extract the "Directory" from the path so I can create myDirectory in...
4
by: davin.pearson | last post by:
Here is my file index.php: <?php include "../parent.php"; ?> When I try to run this code on a Linux server, it gives me the following error message: Warning: main(): open_basedir...
3
by: =?Utf-8?B?UGF1bCBIYXRjaGVy?= | last post by:
I have a setup with two web applications, call them parent and child where child is web application held virtual underneath parent though not physically. What I'd like to be able to do is write...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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 project—planning, coding, testing,...

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.