ASP-0126 Include File Not FoundRSS

13 replies

Last post Jul 14, 2005 09:50 PM by jeff@zina.com

  • ASP-0126 Include File Not Found

    Jun 14, 2005 05:29 PM|yuvarajs|LINK

    All

    I am working with .Net Applications and as well as Classic ASP Applications.  When I deploy the ASP Application into a testing server with Win 2K & IIS5.0 (with .Net 1.1 Installed in it), I could not deploy the ASP Application successfully.

    I try to open a page, say DEFAULT.ASP that contains the following include directive

    <!-- #INCLUDE VIRTUAL="includes/inc.asp"-->

    The browser repeatedly gives me the " ASP-0126 Include File Was Not Found " error.  I tried in various forums and could not find the right fix.  Repeated posts say that it is a problem with the Win 2K SP.  That is also being ruled out in my case since I am using SP4.

    Windows 2000 Server with SP 4
    IIS 5.0
    .Net 1.1

    This is the configuration I am using in my test box.

    Please clarify this kindly.  I am losing on this.

    Thanks in advance.

    Regards,
    Y
  • Re: ASP-0126 Include File Not Found

    Jun 15, 2005 09:02 AM|tomkmvp|LINK

    How about:

    <!-- #INCLUDE FILE="includes/inc.asp"-->
  • Re: ASP-0126 Include File Not Found

    Jun 20, 2005 04:47 PM|yuvarajs|LINK

    Tom

    I can't afford to change the pointers of INCLUDE DIRECTIVES.  The code is working fine in production.  I am trying to have a development instance and after successfully deploying the ASP Application, it throws this error.

    Let me know if there is any alternate solution for this.

    Thanks

  • Re: ASP-0126 Include File Not Found

    Jun 21, 2005 09:18 AM|tomkmvp|LINK

    Apparently it's a path problem then - something is different about the paths on the two servers.
  • Re: ASP-0126 Include File Not Found

    Jun 21, 2005 02:43 PM|yuvarajs|LINK

    Tom Thanks once again for the response. I don't really get the picture at all. See, the IIS Virtual Site definition in production is like this. www.sitename.com Home Directory : D:\Directory_Name Under this site, there is a virtual directory defined. Alias : Alias1 (www.sitename.com/Alias1) Home Directory : D:\Directory_Name\Sub_directory_name The "includes" directory is also defined as a Virtual Directory under this site. Alias : includes Home Directory : D:\Directory_Name\includes So, basically, the "includes" directory and the alias are at the same level below the home directory of the root directory for this website. In the development version, the root directory is; C:\Inetpub\wwwroot. I am having three virtual directories under this root. 1. Home of the Application - replica of production. Name : https://localhost/Services/ Directory : C:\Inetpub\wwwroot\Directory_Name 2. Home of the Sub-Application Name : https://localhost/Services/Alias1 Directory : C:\Inetpub\wwwroot\Directory_Name\Sub-directory_name 3. Home of Includes Name : https://localhost/Services/includes Directory : C:\Inetpub\wwwroot\Services\includes I have tried all possible locations for the includes file. I, in fact, placed it in the same directory as the sub-application and tried. It was still giving me "ASP_0126" error. Am actually left without even a single clue of what is happening inside. I tried to open up the ASPX pages that are part of the application and they seem to open fine. But not the ASP pages with the INCLUDE VIRTUAL tag. Please help ! Tx & Rgds Y
  • Re: ASP-0126 Include File Not Found

    Jun 21, 2005 04:20 PM|jeff@zina.com|LINK

    This is a little hard to follow (using the RETURN key would help...), but from what I see here you are saying that on the production server, you would get to the page with the includes at:

    http://www.sample.com/alias1/index.asp

    And the actual include files would be directly at:

    http://www.sample.com/includes/file.inc

    And on your development system you would have the page with includes at:

    http://localhost/subdirectory/alias1/index.asp

    And the includes at:

    http://localhost/subdirectory/includes/file.inc

    If your include virtual directive on the production server is:

    <!-- #INCLUDE VIRTUAL="includes/inc.asp"-->

    Then you shoudl get the exact error you're seeing.  Because in your development environment it ain't there.  It's at:

    <!-- #INCLUDE VIRTUAL="subdirectory/includes/inc.asp"-->

    Your path from the root of the web site must be exactly idnetical on both production and development servers if you expect this to work.  Meaning you have to move everything on your development server up a level and get rid of the /subdirectory section of your path.

    Jeff
    Have you Binged a solution before posting?
  • Re: ASP-0126 Include File Not Found

    Jun 21, 2005 04:59 PM|tomkmvp|LINK

    Exactly what Jeff said ...
  • Re: ASP-0126 Include File Not Found

    Jul 13, 2005 11:37 AM|yuvarajs|LINK

    Hi Jeff / Tom

    I understand your solution.  Still, it didn't work out.

    Some more on this.

    Default Web Site root - C:\Inetpub\wwwroot\ (http://localhost/)
    Application 1's Virtual Directory - C:\Inetpub\wwwroot\TestApp1 (http://localhost/TestApp1/)
    Application 2's Virtual Directory - C:\Inetpub\wwwroot\SubApp (http://localhost/TestApp1/SubApp/)
    Includes' Virtual Directory - C:\Inetpub\wwwroot\includes (http://localhost/TestApp1/includes/)

    In the SubApp, I am using the include directive just as it is in production.  i.e., <!--# INCLUDE VIRTUAL="includes/nocache.inc"-->  I tried all possible ways to refer to the "includes" Virtual Directory.  But, all references yielded "INCLUDE FILE NOT FOUND".

    I hope this is bit more clear.

    Please help !

    Thanks
    Y
  • Re: ASP-0126 Include File Not Found

    Jul 13, 2005 05:12 PM|tomkmvp|LINK

    "Application 1's Virtual Directory - C:\Inetpub\wwwroot\TestApp1 (http://localhost/TestApp1/)"

    That's not a virtual directory at all, it really is under wwwroot.

    "Application 2's Virtual Directory - C:\Inetpub\wwwroot\SubApp (http://localhost/TestApp1/SubApp/)"

    That doesn't make any sense - why not just http://localhost/SubApp/?  Why did you make it a vdir of TestApp1?  If you wanted it to be under testapp1, then you should have used C:\Inetpub\wwwroot\TestApp1\SubApp ...

    "In the SubApp, I am using the include directive just as it is in production.  i.e., <!--# INCLUDE VIRTUAL="includes/nocache.inc"-->"

    That won't work, as that says that "includes" is a subfolder of SubApp.  You should use:
    <!-- #INCLUDE FILE="/includes/inc.asp"-->
    (and it makes no sense to have a vdir for C:\Inetpub\wwwroot\includes)
  • Re: ASP-0126 Include File Not Found

    Jul 13, 2005 05:33 PM|yuvarajs|LINK

    Tom

    Once again thanks for the response.  I did make a mistake in the previous post.  After posting it only, I realized.

    Anyway, my correct configuration is;

    C:\Inetpub\wwwroot\TestApp1\SubApp - http://localhost/TestApp1/SubApp

    The reference to the includes is; <!--# INCLUDE VIRTUAL="includes/nocache.inc"-->

    As per your suggestion, I have removed the INCLUDES virtual directory from the IIS and "includes" is the subdirectory now for SubApp1.

    The INCLUDE VIRTUAL is working fine for the TestApp1.  When that is the case, why not for SubApp which is basically a sub directory under TestApp1, and it is defined as a Virtual Directory as well.

    Please clarify !

    Y

    Why still it is causing the prob
  • Re: ASP-0126 Include File Not Found

    Jul 14, 2005 11:15 AM|jeff@zina.com|LINK

    You're not paying attention.  Virtual includes start at the root of the site.  So in the case of:

    > Application 1's Virtual Directory - C:\Inetpub\wwwroot\TestApp1 (http://localhost/TestApp1/)
    > Application 2's Virtual Directory - C:\Inetpub\wwwroot\SubApp (http://localhost/TestApp1/SubApp/)

    Using the include directive:

    >  <!--# INCLUDE VIRTUAL="includes/nocache.inc"-->

    Will be in two separate locations, because you still have two separate roots.  Since you say your physical layout is:

    >  C:\Inetpub\wwwroot\TestApp1\SubApp

    Application 1's include will place the include file in:

    C:\Inetpub\wwwroot\TestApp1\includes\nocache.inc

    Application 2 will be at:

    C:\Inetpub\wwwroot\TestApp1\SubApp\includes\nocache.inc

    If you want these to be the same location, do this:

    1)  Stop using virtual directories.  The first does you no good, the second is also a waste for what you're doing.

    2)  Create a folder structure like this:

    C:\Inetpub\wwwroot\TestApp1\
    C:\Inetpub\wwwroot\SubApp\
    C:\Inetpub\wwwroot\includes\

    3)  Make the root of your web site:

    C:\Inetpub\wwwroot\

    Then your inlcude statements will work.

    Jeff



    Have you Binged a solution before posting?
  • Re: ASP-0126 Include File Not Found

    Jul 14, 2005 11:28 AM|tomkmvp|LINK

    Thanks for chipping in Jeff ... starting to lose patience here ...
  • Re: ASP-0126 Include File Not Found

    Jul 14, 2005 11:40 AM|yuvarajs|LINK

    Tom / Jeff

    I am really sorry that I had to bug you guys a lot on this small issue.

    Anyway, I thank you guys really for resolving this issue.

    Just a small explanation of why it turned out to be a situation for you guys to lose patience in responding to my query.

    The system I am supporting is a pretty old one developed in ASP.  There are 3 pages with .Net implementations.  Above all, all the URL referenced in the system are ABOSLUTEL URLs.  If they had been RELATIVE REFERENCES, then this development instance deployment would have been a simple one.  Also, the SubApp receives logon credentials through the TestApp1.  Though it is unnecessary to be done this way, the folks who developed the system had done an implementation like this.

    On top of everything else, there are certain budgetorial constraints towards this.  That is why I had kept on bugging you guys about the possible issue & resolution for the same.

    Now everything is clear and I could atleast get this application management off of my hand. :-)

    Thanks again !

    Yuvaraj.S

  • Re: ASP-0126 Include File Not Found

    Jul 14, 2005 09:50 PM|jeff@zina.com|LINK

    Glad you got it resolved.  Another option is always available -- two include directories.  Create  batch file to replicate the "master" one to the second one and run it every hour or whatever.  I had to do this in one case because political issues beat out technical issues.  :)

    Jeff

    Have you Binged a solution before posting?