Express ASP error 0131 - "Disallowed Parent Path" (不能用“..”表示父目录)

提示一下,如果要调试 ASP ,IIS  Express 功能似乎有些不足,配置了半天,就是不能设置断点,最后直接用 Windows 7 x64 的IIS,直接附加进程就可以调试了,具体原因未知。

VS2012 使用 IIS 7.5 Express 调试 ASP 时候 显示 error 0131 - "Disallowed Parent Path" (不能用“..”表示父目录)

这个问题是微软为了规避可能的文件访问异常而屏蔽了".." ,默认是不支持父路径访问的。但是在实际中我们又不可避免的会用到,因为确实比较方便。

用记事本打开"我的文档\IISExpress\config\applicationhost.config",找到如下内容:

<asp scriptErrorSentToBrowser="true">
 <cache diskTemplateCacheDirectory="%TEMP%\iisexpress\ASP Compiled Templates" />
 <limits />
</asp>

修改为:

<asp scriptErrorSentToBrowser="true" enableParentPaths="true">
<cache diskTemplateCacheDirectory="%TEMP%\iisexpress\ASP Compiled Templates" />
<limits />
</asp>

还有其他的设置选项,提供参考

enableParentPaths="true"  //启用父路径
bufferingOn="true"
errorsToNTLog="true"
appAllowDebugging="true"
appAllowClientDebug="true"
scriptErrorSentToBrowser="true"

发布者

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注