Article ID: 226474 - Last Review: July 7, 2008 - Revision: 7.1 Error message when you use relative paths in include statements with Active Server Pages: "Active Server Pages, ASP 0131 Disallowed Parent Path"This article was previously published under Q226474 We strongly recommend that all users upgrade to Microsoft Internet Information Services (IIS) version 7.0 running on Microsoft Windows Server 2008. IIS 7.0 significantly increases Web infrastructure security. For more information about IIS security-related topics, visit the following Microsoft Web site: http://www.microsoft.com/technet/security/prodtech/IIS.mspx
(http://www.microsoft.com/technet/security/prodtech/IIS.mspx)
For more information about IIS 7.0, visit the following Microsoft Web site: http://www.iis.net/default.aspx?tabid=1
(http://www.iis.net/default.aspx?tabid=1)
On This PageSYMPTOMS When you use relative paths in include statements with
Microsoft Active Server Pages (ASP), browsing a Web page may return an error
message similar to the following: Active Server Pages,
ASP 0131 Disallowed Parent Path The Include file '../<filename.ext>' cannot contain '..' to indicate the parent directory. /<path>/<filename.ext>, line <number> CAUSE This is caused by disabling ASP's "parent paths" for a Web
site or application while using relative parent paths in an include statement.
Relative parent paths in include statements use the following form: <!--#include file="../<filename.ext>"--> RESOLUTION The best solution to the problem is to use absolute virtual
paths from the root of the Web site instead of relative paths. For example, if you use an include file named "mycode.inc" at the root of your server, the virtual path would be "/mycode.inc." If you use the same include file in a virtual directory named "/includes" on your server, the virtual path would be "/includes/mycode.inc." The syntax example below illustrates how to implement virtual paths: <!--#include virtual="/<virtual path>/<filename.ext>"--> Internet Information Services 7.0
Internet Information Services 6.0
MORE INFORMATION There are additional security considerations to be considered
when enabling parent paths on an IIS computer.
For more information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
184717
(http://support.microsoft.com/kb/184717/
)
AspEnableParentPaths MetaBase property should be set to False
332117
(http://support.microsoft.com/kb/332117/
)
Enable Parent Paths is disabled by default in IIS 6.0
For more information about troubleshooting this and other ASP errors that may occur with IIS 6.0, visit the following Microsoft Web sites: Troubleshooting and Important Changes in ASP http://technet.microsoft.com/en-us/windowsserver/default.aspx (http://technet.microsoft.com/en-us/windowsserver/default.aspx) | Article Translations
|

Back to the top
