How to set Allow Parent Paths in IIS Express Config

ぃ、小莉子 提交于 2019-12-31 17:52:41

问题


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?


回答1:


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.




回答2:


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



来源:https://stackoverflow.com/questions/4769751/how-to-set-allow-parent-paths-in-iis-express-config

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!