在 Error Responses 中,选择 Detailed errors,单机 OK 完成配置。
通过命令行
启用详细错误: %windir%\system32\inetsrv\appcmd.exe set config "Default Web Site/yourapp" /section:httpErrors /errorMode:Detailed
禁用详细错误: %windir%\system32\inetsrv\appcmd.exe set config "Default Web Site/yourapp" /section:httpErrors /errorMode:Custom
通过命令行
启用: %windir%\system32\inetsrv\appcmd set config -section:asp -scriptErrorSentToBrowser:true
禁用: %windir%\system32\inetsrv\appcmd set config -section:asp -scriptErrorSentToBrowser:false
注意上面参数中 config 后面不能指定站点目录
其他链接:
The new Configuration System in IIS 7 http://blogs.msdn.com/carlosag/archive/2006/04/25/IIS7ConfigurationSystem.aspx
System.webServer Section Group http://msdn.microsoft.com/en-us/library/ms689429.aspx
Improve PHP Error Messages in IIS 7 http://learn.iis.net/page.aspx/765/improve-php-error-messages-in-iis-7/
Tips for Classic ASP developers on IIS7 http://blogs.iis.net/bills/archive/2007/05/21/tips-for-classic-asp-developers-on-iis7.aspx
IIS 7 父子目录同时安装 WordPress 时固定链接的问题 http://blogs.leoworks.net/php2010/2010/01/13/break-iis7-url-rewrite-rule-inheritance-for-parent-child-wordpress/
此文在晓风博客 http://blogs.leoworks.net/jinglecat/post/iis7-show-defailed-error.aspx