In Internet Information Services (IIS), parent paths are disabled by default for security reasons. If you're using Classic ASP and need to use ..
(double dots) to refer to parent directories (e.g., in #include
statements), you’ll need to enable this feature manually.
"Parent paths" allow you to reference directories above the current one using ..
, which is common in legacy ASP applications like:
<!--#include file="../common/header.asp"-->
Open IIS Manager
Press Windows + R
, type inetmgr
, and press Enter.
Or open IIS Manager from the Start menu or Control Panel > Administrative Tools.
Select Your Site or Application
In the Connections pane, expand the server node.
Click on the site or specific application where ASP is used.
Open ASP Settings
In the Features View, double-click ASP (you may need to enable it via “Add Roles and Features” if not visible).
Expand the Behavior section.
Enable Parent Paths
Find the setting labeled Enable Parent Paths.
Set it to True.
Apply the Changes
In the Actions pane on the right, click Apply.
Restart IIS (Optional)
To ensure the changes take effect, you can restart IIS using:
iisreset
If you're managing via web.config, you can also enable parent paths by adding:
<configuration>
<system.webServer>
<asp enableParentPaths="true" />
</system.webServer>
</configuration>
Enabling parent paths can expose your server to directory traversal vulnerabilities if input is not properly sanitized. Always validate and sanitize file paths and input in legacy ASP apps.