ASP Error 0126 include file not found, when using ".." in include file path

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Eric

    ASP Error 0126 include file not found, when using ".." in include file path

    Hello,

    I tried to post this a few minutes ago, but never saw it show up,
    hopefully this won't be a double-post.

    I have some server side includes on a Classic asp page that look
    something like:

    <!-- #include virtual="/includes/file1.asp"-->
    <!-- #include virtual="/includes/file2.asp" -->
    <!-- #include virtual="/includes/file3.asp" -->
    <!-- #include virtual="/includes/file4.asp" -->
    <!-- #include virtual="/includes/file5.asp" -->
    <!-- #include virtual="/includes/file6.asp" -->
    <!-- #include virtual="/includes/file7.asp" -->
    <!-- #include virtual="../includes/file8.asp" -->
    <!-- include virtual="/_utils/file9.asp" -->

    When we'd attempt to load the page it would give us a ASP Error 0126
    include file not found error referring to ../includes/file8.asp.

    I changed it to a /includes/file8.asp and the problem went away. I
    don't really see what the advantage of having the .. in there, but we
    have this type of syntax in a lot of other asp pages.

    I can do a search and replace, but I'm wondering if there's some IIS
    setting that will prevent the error from happening. I was thinking
    that we should turn on directory browsing, but it was already on (this
    is an internal test web site).

    Could there be some kind of user permission issue? This is on a
    freshly built from scratch test server. The web page hasn't really
    changed much, not at all with regard to this include statement.

    Thanks,
    Eric

Working...