Active Server Pages error 'ASP 0131'
When you get this "Active Server Pages error 'ASP 0131'", it means your server doesn稚 support reference to parent folder.
This usually happens when you try to include file that is located in the parent folder (or upper folder of the current folder).
Scenario:
- folder1
includefile.asp (example1)
- folder2
filename.asp
- folder3
includefile.asp (example2)
We have "filename.asp" which includes "includefile.asp".
Example1:
<!-- #include file="../includefile.asp"-->
You will get error message:
Active Server Pages error 'ASP 0131'
Disallowed Parent Path
/folder1/folder2/filename.asp, line 26
The Include file '../includefile.asp' cannot contain '..' to indicate the parent directory.
Example2:
<!-- #include file="../folder3/includefile.asp"-->
You will get error message:
Active Server Pages error 'ASP 0131'
Disallowed Parent Path
/folder1/folder2/filename.asp, line 26
The Include file '../folder3/includefile.asp' cannot contain '..' to indicate the parent directory.
How to solve:
1. To resolve this problem without changing the application:
To do this, you need to check the "Enable Parent Paths" check box on IIS manager located in the IIS server that hosts your ASP sites. If you host it at some hosting companies, you can ask the admin to do it for you. But if you host it at your own PC, you can see how to configure it step by step in https://support.microsoft.com/default.aspx?scid=kb;en-us;332117 under "WORKAROUND" subtitle.
2. Removing the ".." in include tag (AND moving the include file)
In case Example1:
Move the include file (includefile.asp) to the same folder as where the "filename.asp" file (inside folder2).
Change the include tag to:
<!-- #include file="includefile.asp"-->
In case Example2:
Move the folder "folder3" (along with the includefile.asp inside it) under folder2.
Change the include tag to:
<!-- #include file="folder3/includefile.asp"-->
Related Articles
Editor's Picks Articles
Top Ten Articles
Previous Features
Site Map
Content copyright © 2023 by Linawaty. All rights reserved.
This content was written by Linawaty. If you wish to use this content in any manner, you need written permission. Contact Lisa Shea for details.