ASP and paths in include

Asked

Viewed 136 times

0

Hello,

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

the default.Asp file is located in:

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

and I want it to upload files located in:

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

No default.SP I have:

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

however I get the IIS’s Internal server error.

If I place the lang.Asp file in the same directory as the default.Asp, it is loaded. The idea is that (lang.Asp) be loaded by other applications in other directories.

Can you help me?

  • However it was possible to correct this problem. I leave the resolution here in case someone with the same situation appears. It was necessary, in the Application Pool of the site, in the ASP settings to put to True the parameter "Enable Parent Paths". I then re-started the app pool and the app worked.

1 answer

0

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

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

Open IIS Manager and navigate to your site or application that you want to set up "Parent Path" and two-click "ASP"

IIS

In ASP Settings Lists, set "Parent Paths" to true.

IIS

According to Microsoft, you can also run the following command line: appcmd.exe set config "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.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.