You may receive an "ASP 0126" error message when you try to view an ASP Web page that is hosted in IIS 6 (920721)
The information in this article applies to:
- Microsoft Internet Information Services 6.0
SYMPTOMSConsider 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 CAUSEThis issue occurs if the Test.asp Web page contains the #include virtual statement with a relative file path.WORKAROUNDTo work around this issue, use one of the following methods. Method 1: Use the #include virtual statement together with an absolute file pathTo 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: Method 2: Use the #include file statement together with a relative file pathTo 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: 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. STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 6/27/2006 |
---|
Keywords: | kbcode kbtshoot kbprb KB920721 kbAudDeveloper kbAudITPRO |
---|
|