Active InfoActive Info  Display List of Info MembersMemberlist  Search The InfoSearch  HelpHelp
  RegisterRegister  LoginLogin
Scripting Error Messages
 CJWSoft Support Info : Scripting Error Messages
Subject Info: Disallowed Parent Path A d d  -  P o s tAdd P o s t
Author
Message << Prev Info | Next Info >>
cwilliams
Admin Group
Admin Group
Avatar
CJWSoft Web Software Developer

Joined: April/06/2004
Online Status: Offline
Info: 1595
Added: April/07/2004 at 1:41am | IP Logged Quote cwilliams

Disallowed Parent Path

The Include file '../dataconn_inc.asp' cannot contain '..' to indicate the parent directory. 

When you get an error like this it is because parent paths are disabled on the web server. This is a setting in the IIS console for your website.

If it is not enabled on you server you will have to ask your host to enable parent paths for your website.

This is what the settings screen looks like on an XP Machine



Additional Information:

It is enabled by default on IIS4-IIS5 but in IIS6 it is disabled by default.
It is a minor security risk to have enabled and some hosts can be difficult about setting it.

Truth is, if your hosting ASP for customers you need to enable this setting if the customer requests it. Especially since 90% of the ASP applications out there require the setting.

Hosting companies should if they are serious about hosting ASP.


If they won't your only option is to go through all the code and convert the file includes to virtual includes.

http://www.powerasp.com/content/code-snippets/includes.asp

The trouble with virtual includes is they are different depending on the layout of your website. (that's why web application developers generally don't use them)

Basically if you are in a sub domain the path for the virtual include is going to be different then if you were in the root.. etc etc

Also.. someone developing on a local machine would need totally different virtual includes on the development server than they would on the live server. Server Side includes are processed before ASP so there is no way to make them SMART, so to speak. Server Side includes are hardcoded and that's that.

In my opinion virtual includes are pretty useless for commercial web based applications...  Since you don't know where the customers plan to install the apps.
And YES there are some tricks when designing the applications that make it less of an issue but they are not perfect solutions.

For example...

The virtual include below would work if the application or code was installed in the root
<!--#include virtual = /somefile.asp"-->

But if the application or code was installed in a directory called "somedirectory" the virtual include directive would need to look like this

<!--#include virtual = "/somedirectory/somefile.asp"-->



Edited by cwilliams on February/08/2005 at 2:28pm


__________________

Best Regards, Christopher Williams www.CJWSoft.com
Back to Top View cwilliams's Profile Search for other info by cwilliams Visit cwilliams's Homepage
 
Donut
New User
New User


Joined: June/10/2004
Online Status: Offline
Info: 2
Added: June/10/2004 at 1:43pm | IP Logged Quote Donut

Okay, I'm going nuts trying to find that settings screen.

I've got a dedicated server that I connect to using "Remote Desktop Connection" so it looks like a regular Windows desktop. It's running Windows Server 2003.

There's a program called "IIS Manager" but I've looked at all the options for all the different sections and I don't find anything that looks even remotely like that screen.  And, of course, Windows Help is no help at all.

What program do I run to get to that configuration screen?

  Thanks,

  Robert Gidley
Back to Top View Donut's Profile Search for other info by Donut
 
cwilliams
Admin Group
Admin Group
Avatar
CJWSoft Web Software Developer

Joined: April/06/2004
Online Status: Offline
Info: 1595
Added: June/10/2004 at 1:54pm | IP Logged Quote cwilliams

I just did a quick google search... found a ton of info on how to find the setting. Here is one...



These are directions for IIS6 but the process is similar for IIS4-5

  1. Click Start, click Administrative Tools, and then click Internet Information Services (IIS) Manager.
  2. Double-click your computer name in the left pane, and then double-click Web Sites.
  3. Locate the Web site and directory that houses the ASP application.
  4. Right-click the application site or directory, and then click Properties.
  5. Select Home Directory, and then click Configuration.
  6. Click Options, and then click to select the Enable Parent Paths check box.
  7. Click OK two times.


Edited by cwilliams on June/10/2004 at 1:58pm


__________________

Best Regards, Christopher Williams www.CJWSoft.com
Back to Top View cwilliams's Profile Search for other info by cwilliams Visit cwilliams's Homepage
 
Donut
New User
New User


Joined: June/10/2004
Online Status: Offline
Info: 2
Added: June/10/2004 at 2:27pm | IP Logged Quote Donut

Chris,

D'oh! How completely obvious!

I got it now. (In Step 4, by the way, you need to click on the web site, not the directory. The directory has its own Properties menu, which is competely different than the Properties menu for the web site.)

 Thanks for the fast response!

  Robert

Back to Top View Donut's Profile Search for other info by Donut
 
cwilliams
Admin Group
Admin Group
Avatar
CJWSoft Web Software Developer

Joined: April/06/2004
Online Status: Offline
Info: 1595
Added: September/09/2004 at 8:29pm | IP Logged Quote cwilliams

also.. every once in a while I get some nervous person concerned about security... and the pros and cons of having parent paths enabled.

etc etc etc

 

so let me add this bit of info..

I don’t know what your hosting company will say because it is an iffy topic and those that understand it have a hard time explaining it to someone who doesn't. Also usually the hosting company doesn't have a clue except they heard it was a security risk.

Here is the low down from someone that really understands it...
(well, at least I think I do)

The only real security risks are from YOU and possibly other people hosting on the same server if they have parent paths enabled that is.

Meaning your site visitors can't possibly do anything with it unless of course you let them upload and run their own asp files to the server.

Anyway.. if YOU run malicious asp scripts you could potentially attack other sites on the server and look at things you shouldn't. As could other sites on the same server do to you I suppose.

So, unless you plan on doing that or some other site admin on the server does it to you its not really a concern. Just an advantage in coding abilities.

If you attack someone elses site on the server or lurk where you shouldnt then you are probably violating your hosting agreement.

99% of the time everyone gets all nervous over nothing.. half the people nervous about this have sites nobody would ever want to hack anyway.

Many people with a really important/busy sites are going to have a dedicated server somewhere so the setting is not relevant..

The hosting companies of course have to warn you.

This setting was enabled by default for years on IIS4-IIS5. I never once heard one single real story about anyone attacking anything because of this setting. That doesn't mean it doesn't happen but I am just telling you what I know.

This is all my opinion so take it for what it is...

If you are a Hosting Company your better off turning it on at the customers request, giving them a warning about it, and in turn having happy customers.

The big hosting companies like Alentus and MaximumASP do it...

There are far worse things than this to let people do after all.

Beleive it or not I have actually been in servers where they gave the anonymous webserver acount modify permissions EVERYWHERE yet they disabled parent paths ????



Edited by cwilliams on February/08/2005 at 2:27pm


__________________

Best Regards, Christopher Williams www.CJWSoft.com
Back to Top View cwilliams's Profile Search for other info by cwilliams Visit cwilliams's Homepage
 
jazvt
New User
New User


Joined: March/23/2005
Online Status: Offline
Info: 4
Added: March/23/2005 at 12:46pm | IP Logged Quote jazvt

I have just started to move my sites to a new dedicated Windows 2003 box.  I have parent paths enabled, SSI turned on but I still can't get ../ to work with server side includes.  Everything I read online says that I need to turn on parent paths but again, they are already turned on.

The hosting company where the server is located can't tell me anything, they just say that that is the way it is with Windows 2003.  I don't buy it!

Can anyone tell me anything on this issue to help enable the ../ for serverside includes? 

Back to Top View jazvt's Profile Search for other info by jazvt
 
cwilliams
Admin Group
Admin Group
Avatar
CJWSoft Web Software Developer

Joined: April/06/2004
Online Status: Offline
Info: 1595
Added: March/23/2005 at 12:52pm | IP Logged Quote cwilliams

I have never heard of such a thing...
If the settings are enabled for the web it should work.
That is, as long as your include file syntax is valid.

I run my own windows 2003 server (you are on it now) so I should know

for troubleshooting

try a very very simple example... like a file in a folder.. with a server side include to a file under it

and see if that works

use real simple asp files with nothing crazy in them... and an include like this

<!--#include file = "../myfile.asp"-->



Edited by cwilliams on March/23/2005 at 12:55pm


__________________

Best Regards, Christopher Williams www.CJWSoft.com
Back to Top View cwilliams's Profile Search for other info by cwilliams Visit cwilliams's Homepage
 
jazvt
New User
New User


Joined: March/23/2005
Online Status: Offline
Info: 4
Added: March/23/2005 at 1:40pm | IP Logged Quote jazvt

I have narrowed it down.  The ../ for includes will not work with .asp files but will work in .shtml files.

any ideas?

Back to Top View jazvt's Profile Search for other info by jazvt
 
jazvt
New User
New User


Joined: March/23/2005
Online Status: Offline
Info: 4
Added: March/23/2005 at 1:42pm | IP Logged Quote jazvt

... in addition it is a virtual include not a file.  I just tried to use file instead of virtual and then the ../ includes worked on the asp pages.

This is strange because they used to work like that on the 2000 server I had these sites running on.

Back to Top View jazvt's Profile Search for other info by jazvt
 
cwilliams
Admin Group
Admin Group
Avatar
CJWSoft Web Software Developer

Joined: April/06/2004
Online Status: Offline
Info: 1595
Added: March/23/2005 at 3:49pm | IP Logged Quote cwilliams

You are not supposed to use "../" with a virtual include

Thats goes against what a virtual include is and makes no sense.
When using a virtual include you give the path as if accessing from the root of the main web / virtual directory

I find it very hard to believe it ever worked like that and if it ever did it was wrong.

 



Edited by cwilliams on March/23/2005 at 4:05pm


__________________

Best Regards, Christopher Williams www.CJWSoft.com
Back to Top View cwilliams's Profile Search for other info by cwilliams Visit cwilliams's Homepage
 
jazvt
New User
New User


Joined: March/23/2005
Online Status: Offline
Info: 4
Added: March/23/2005 at 4:08pm | IP Logged Quote jazvt

who knows, thanks for your input, I am further than I was when I started talking to you!
Back to Top View jazvt's Profile Search for other info by jazvt
 

If you wish to make a comment to this info you must first login
If you are not already registered you must first register

  A d d  -  P o s tAdd P o s t
Printable version Printable version

Info Jump
You cannot add new info in this area
You cannot add to info in this area
You cannot delete your info in this area
You cannot edit your info in this area
You cannot create polls in this area
You cannot vote in polls in this area


Active Server Pages help tutorial how to ASP Help ASP Tutorials ASP Programming ASP Code - ASP Free CJWSoft ASPProtect ASPBanner ASPClassifieds www.aspprotect.com, www.powerasp.com,www.aspclassifieds.com,www.aspphotogallery.com,www.codewanker.com