I'm assuming this is possible in the applicationhost.config file but I did not see a parent paths setting.
How do you allow parent paths for a specific site running under IIS Express?
I'm assuming this is possible in the applicationhost.config file but I did not see a parent paths setting.
How do you allow parent paths for a specific site running under IIS Express?
Browse to C:\Documents and Settings\$your user name$\My Documents\IISExpress\config
Open applicationHost.config
Find the <system.webServer>
section
Change the <asp>
section to the following…
By default it only had the cache and empty limits bits but feel free to adjust any parameters you don't want.
<asp
enableParentPaths="true"
bufferingOn="true"
errorsToNTLog="true"
appAllowDebugging="true"
appAllowClientDebug="true"
scriptErrorSentToBrowser="true">
<session allowSessionState="true" />
<cache diskTemplateCacheDirectory="%TEMP%\iisexpress\ASP Compiled Templates" />
<limits />
</asp>
Save and restart iis express.
asp
section inside system.webServer
, not the one in the commented section on the top of the applicationhost.config file. –
Asteriated C:\Users\$your_name$\Documents\IISExpress\config
. –
Donee <sectionGroup name="system.webServer">
. There are a bunch of elements with attribute overrideModeDefault
. I had to change from Deny
to Allow
for the settings I was trying to change. –
Harvell The following should get you going.
On 32bit system "%programfiles%\iis express\appcmd" set config "Default Web Site/myapp -section:asp -enableParentPaths:true
On 64 bit system"%programfiles(x86)%\iis express\appcmd" set config "Default Web Site/myapp -section:asp -enableParentPaths:true
Link to related IIS 7 config reference: http://www.iis.net/ConfigReference/system.webServer/asp
"Default Web Site/myapp
-- where's the closing "
go? –
Helli Can not set attribute "enableParentPaths" to value "true".. Reason: This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".
–
Cum /commit:apphost
–
Lejeune If I'm not the only one still supporting .asp in 2022 AD with Visual Studio you may need to change the application.config in the hidden .vs[solution name]\config folder if the answer by @Flapper does not work.
What might be happening is that VS copies the root IIS application.config into .vs for the solution so any changes to the root would not impact an existing solution config. In my case I had to change the solution .config as well as the root IIS .config for it to work.
In my case, I'm runninig iisexpress
from the command-line and @Flapper's solution and a few others didn't work, then I noticed iisexpress
outputs the template config path when running from the command-line:
> "C:\Program Files (x86)\IIS Express\iisexpress.exe" /path:%cd% /port:8080 /clr:v2.0
Which outputs:
Copied template config file 'C:\Program Files (x86)\IIS Express\AppServer\applicationhost.config' to 'C:\Users\rcdmk\AppData\Local\Temp\iisexpress\applicationhost20244285325599.config'
Updated configuration file 'C:\Users\rcdmk\AppData\Local\Temp\iisexpress\applicationhost20244285325599.config' with given cmd line info.
Starting IIS Express ...
Successfully registered URL "http://localhost:8080/" for site "Development Web Site" application "/"
Registration completed
IIS Express is running.
Enter 'Q' to stop IIS Express
I updated that template file, located at C:\Program Files (x86)\IIS Express\AppServer\applicationhost.config
with @Flapper's config and restarted the server, then it worked.
© 2022 - 2025 — McMap. All rights reserved.