ASP error 0131: configuring my extensions to support disabled parent paths in IIS
Issue
Dreamweaver must use dot-dot-slash ("../") notation (i.e. parent paths) for database connection include files if the ASP file is located in a subfolder off the site root. If you configure Microsoft's Internet Information Server (IIS) such that parent paths are disallowed, you may encounter the following error when viewing a Dreamweaver generated ASP page in a web browser:
IIS 5 (Windows 2000 / XP):
Error Type:
Active Server Pages, ASP 0131 (0x80004005)
The Include file '../Connections/myConn.asp'
cannot contain '..' to indicate the parent directory.
/myFolder/mySubFolder/myPage.asp, line 2
IIS 4 (Windows NT):
Active Server Pages error 'ASP 0131'
Disallowed Parent Path
/myFolder/mySubFolder/myFile.asp, line 2
The Include file '../Connections/myConn.asp' cannot contain
'..' to indicate the parent directory.
Reason
This error is a result of disabling the "Enable Parent Paths" setting for a particular ASP website or web application, as it is defined within IIS. For instructions on how to enable/disable parent paths in IIS, please refer to the following Microsoft Knowledge Base article:
Err Msg: Active Server Pages, ASP 0131 Disallowed Parent Path or the IIS documentation.
Solution
To remedy this conflict, it is necessary to change the "file" attribute of the include statement to "virtual" and ensure that the site root is also the website root. Modifications can be made to the
connectionref.edml
file which automates these changes.
Make a back-up copy of one of the following files, depending on which extension you have installed:
Change the name of the copy, for example:
connectionref_Old.edml
Open the connectionref.edml file.
The data of the
insertText
field is as follows:
<!--#include file="@@relpath@@Connections/@@cname@@.@@ext@@" -->
Change
file
to
virtual
.
Change
@@relpath@@
to "/"
The line should now look like this:
<!--#include virtual="/Connections/@@cname@@.@@ext@@"-->
Look for the following tag:
<searchPattern>
. Locate the following portion of the tag:
<![CDATA[/<!--#include file="
Change the portion highlighted in red:
<![CDATA[/<!--#include
file="
to the following:
<![CDATA[/<!--#include
virtual="
Save the file.
Exit out of Dreamweaver and then launch it again.
New connection references placed on a page will now use the "virtual" attribute instead of "file". You will have to manually edit existing include statements that use "file" to convert them to "virtual".
Additional information
For more details on enabling or disabling parent paths, please refer to the following Microsoft Knowledge Base articles:
Err Msg: Active Server Pages, ASP 0131 Disallowed Parent Path
and
AspEnableParentPaths MetaBase Property Should Be Set To False.