Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP Error 0131: Parent Path is not allowed

I'm trying to run an ASP Classic application on Visual Studio 2013 and IIS Express. I'm getting the following error when running one the page:

Active Server Pages error 'ASP 0131'
Disallowed Parent Path
../..
The Include file '../file.inc' cannot contain '..' to indicate the parent directory.

I've researched the issue online and found out that the problem is related to the ../ that is disabled by default. The solution proposed is to allow the Parent Path. While this solution is discouraged for security reasons, moreover, I don't have administrative privileges to make such changes.

Is there another way to solve this problem that doesn't involve allowing Parent Path?

like image 987
Richard77 Avatar asked Sep 19 '25 22:09

Richard77


2 Answers

Another way to solve this issue without modifying the code is described in this article, by enabling ASP Parent Paths at the site configuration in the IIS, simple steps are:

  1. go to the ASP feature of the site or application you want to configure parent paths on IIS Manager,
  2. in the list that appears configure the Enable Parent Paths option setting it to True.
like image 181
ecedenyo Avatar answered Sep 21 '25 14:09

ecedenyo


Yes, the alternative is to use the include virtual directive, you would have to update all paths to be from the root of the virtual directory

Include Virtual '/file.inc'

or

Include Virtual '/Folder/file.inc'
like image 24
Dijkgraaf Avatar answered Sep 21 '25 16:09

Dijkgraaf