Sammu’s Weblog

Active Server Pages error ‘ASP 0131′

Recently, while i was developing for a site i had problems with the windows Internet Information Service 7.0.
the problem i had was

Active Server Pages error ‘ASP 0131′

Disallowed Parent Path

/home/publications/Default.asp, line 1

The Include file ‘../connection/str.asp’ cannot contain ‘..’ to indicate the parent directory.

According to microsoft “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 that in IIS 7.0″

it is caused by  disabling ASP’s “parent paths” for a Web site or application while using relative parent paths in an include statement.

Example :

<!--#include file="../test.ext"-->

The best solution to the problem is to use absolute virtpaths 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:

Leave a Reply