Microsoft KB Archive/920721

= You may receive an &quot;ASP 0126&quot; error message when you try to view an ASP Web page that is hosted in IIS 6 =

Article ID: 920721

Article Last Modified on 11/22/2007

-

APPLIES TO


 * Microsoft Internet Information Services 6.0

-





SYMPTOMS
Consider the following scenario. In Microsoft Internet Information Services (IIS) 6, you create a virtual directory that is named Samples. The Samples virtual directory contains a subfolder that is named Includes. The Includes folder contains a subfolder that is named Files. The Includes folder contains a Microsoft Active Server Pages (ASP) Web page that is named Date.asp. The Files subfolder contains an ASP Web page that is named Test.asp. In the Test.asp Web page, you use an #include statement to insert the contents of the Date.asp Web page into the Test.asp Web page.

In this scenario, you may receive an error message that resembles the following when you try to view the Test.asp Web page:

Active Server Pages error 'ASP 0126'

Include file not found



CAUSE
This issue occurs if the Test.asp Web page contains the #include virtual statement with a relative file path.



WORKAROUND
To work around this issue, use one of the following methods.

Method 1: Use the #include virtual statement together with an absolute file path
To work around this issue, use the #include virtual statement together with an absolute file path in the Test.asp Web page. Consider the following code examples:   The following line of code does not work.   The follow line of code works. 

Method 2: Use the #include file statement together with a relative file path
To work around this issue, use the #include file statement together with a relative file path in the Test.asp Web page. Consider the following code samples:   The following line of code does not work.   The following line of code does work. 

Note By default, parent paths are disabled in IIS 6. To enable parent paths, you must manually set the AspEnableParentPaths property in the metabase to TRUE.

<div class="status_section">

STATUS
This behavior is by design.

Keywords: kbtshoot kbprb kbcode KB920721

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.