Active Server Pages error 'ASP 0126'

Discussion in 'ASP.NET / ASP.NET Core' started by Nelly, Jun 29, 2010.

  1. Active Server Pages error 'ASP 0126'

    Include file not found

    /articles/my-page-title.asp, line 3

    The include file 'includes/config.asp' was not found.


    Hi Guys im seeing this error after:


    Now I intend dropping my 'articles' in this folder but when i do this and point to the url eg www.mysite.co./articles/my-article.asp i get the above error!

    If the .asp file is outside this folder it shows fine.

    I've given the 'Articles' folder full 777 permissions

    Would appreciate your suggestions.

    Ps Ive read that the includes file is 'missing' but why would it work ok outside of the folder that i've created?

    Thanks in advance
     
  2. Hi,
    My guess is in the include directive for the page that is failing you are using "file" instead of "virtual".
    This always was a problem in Classic ASP.

    You have at least three options with Classic ASP v3 because it added the Server directives.

    So...if this were to be failing: <!--#include file="common.asp" -->
    You could write: <!--#include virtual="/includes/common.asp" -->

    In that example the common file is actually located in the folder /includes/

    Which can also be written like this:
    <!--#include file="includes/common.asp" -->
    ...But that can fail.

    What works best is this:
    <%Server.Execute("/includes/common.asp")%>

    ...There's a few things to try anyway. ;-)
    All the best,
    Mark
     
  3. mjp

    mjp

    Just a reminder that those are *nix permissions, and do not translate to a Windows server. Making those changes in an FTP program will not have any effect on your directory permissions.


    We now return you to your regularly scheduled program.
     

Share This Page