CFF KB - Carrz-Fox-Fire Promotions Knowledge Base

CFF KB is all about 1 thing: The Sharing of Knowledge and the Power we gain from it.
  • Breadrumbs:
  • Active Server Pages, ASP 0126 (0x80004005) The include file ' was not found.

  • CFF Knowledge Base - Share With Facebook CFF Knowledge Base - Share on Twitter CFF Knowledge Base - Share on Reddit CFF Knowledge Base - Share on Digg It CFF Knowledge Base - Share on Stumble Upon It CFF Knowledge Base - Share on Delicious
    Share With Friends (Updated 6-8-2010)
  • Article ID:
    36
  • Date Created
    Friday, October 29, 2010
  • Last Updated
    Saturday, October 31, 2015
  • This Article Has been Viewed
    3614 times
  • Short Desc
    When creating your ASP Pages, The include file ' was not found. In IIS, the physical path is not set properly.
  • Details
    Creating ASP Classic and ASP.NET pages we like to seperate our code(s) into multiple pages to help organize the scripts so they do not become too overwhelming. These pages are called INCLUDES and are called into the page like this.

    <!--#include file="Mypage.asp"-->

    If you put the pages into sub-folders, then we add them in like so:

    <!--#include file="SubFolder/Mypage.asp"-->

    And so on.
    If the page is not found due to several reasons such as:
    #1: Misspelled page or folder name
    #2: Page does not exist (or) you have not uploaded the page to your hosting server.
    #3: The Physical Path, of the root is not set in the folder you are using for the websites.

    An example of the error is:

     
    Active Server Pages error 'ASP 0126'
    Include file not found
    Main.asp, line 33
    The include file 'SubFolder/Mypage.asp' was not found.
  • Recreate Issue
    To recreate this issue, lets use the following Scenarios

    Our page is called: MyInc.asp
    Our page is located in the folder named: MySub
    The Include file connection for our page is:

    Scenario #1:
    <!--#include file="MySubs/MyInc.asp"-->

    Scenario #2:
    <!--#include file="MySub/MyIncs.asp"-->

    Scenario #3:
    Physical Path: is set to the incorrect location.
    Example: The default location is selected in this demonstration
  • Resolve Issue
    To correctly write out our INCLUDES so that they do not get this error.
    Make sure that you have the file uploaded to you hosting server and that it actually exist.

    Our page is called: MyInc.asp
    Our page is located in the folder named: MySub
    The Include file connection for our page is:

    <!--#include file="MySub/MyInc.asp"-->