ASP and paths in include

0

Hello,

I have an application installed on IIS 8 whose default file makes include of other files in folders located before the default.asp directory. Exemplifying:

The default.asp file is located at:

httpdocs/www/pasta1/pasta2/pasta3.1/pasta4/default.asp

and I want it to load files located at:

httpdocs/www/pasta1/pasta2/pasta3.2/pasta3.2.1/ficheiro.asp

In default.asp I have:

<!-- #include file="../../pasta3.2.1/lang.asp"-->

However, the IIS internal server error appears to me.

If I put the lang.asp file in the same directory as default.asp, it loads. The idea is this (lang.asp) to be loaded by other applications in other directories.

Can you help me?

    
asked by anonymous 11.03.2015 / 18:14

1 answer

0

By default, the use of "Parent Paths" in IIS is disabled.

You can enable or disable the use of "Parent Path" using IIS Manager.

Open the IIS Manager and navigate to your site or application that you want to configure the "Parent Path" and double-click the "ASP" option

IntheASPsettingslists,set"Parent Paths" to true.

AccordingtoMicrosoft,youcanalsorunthefollowingcommandline:appcmd.exesetconfig"Default Web Site" -section:system.webServer/asp /enableParentPaths:"False" /commit:apphost

But I never did it this way, so I recommend the option displayed in the images.

    
16.03.2015 / 20:15