安装程序:Windows 7,IIS7。我正在研究通过本地IIS服务器查看的应用程序,而不是内置的调试Web服务器。所以我的应用程序的网址是http://localhost/foo/bar.aspx
。在我的web.config中有没有<customErrors>
部分,并且我没有更改IIS中的任何设置。当发生错误时,IIS.19中的500.19错误
如果出现任何错误,我总是得到如下错误屏幕:
HTTP错误500.19 - 内部服务器错误
绝对物理路径“C:\inetpub\custerr
”是不允许在web.config中system.webServer/httpErrors
节文件。改用相对路径。
这里是我的applicationhost.config
内容:
<httpErrors errorMode="Custom" lockAttributes="allowAbsolutePathsWhenDelegated,defaultPath">
<error statusCode="401" prefixLanguageFilePath="%SystemDrive%\inetpub\custerr" path="401.htm" />
<error statusCode="403" prefixLanguageFilePath="%SystemDrive%\inetpub\custerr" path="403.htm" />
<error statusCode="404" prefixLanguageFilePath="%SystemDrive%\inetpub\custerr" path="404.htm" />
<error statusCode="405" prefixLanguageFilePath="%SystemDrive%\inetpub\custerr" path="405.htm" />
<error statusCode="406" prefixLanguageFilePath="%SystemDrive%\inetpub\custerr" path="406.htm" />
<error statusCode="412" prefixLanguageFilePath="%SystemDrive%\inetpub\custerr" path="412.htm" />
<error statusCode="500" prefixLanguageFilePath="%SystemDrive%\inetpub\custerr" path="500.htm" />
<error statusCode="501" prefixLanguageFilePath="%SystemDrive%\inetpub\custerr" path="501.htm" />
<error statusCode="502" prefixLanguageFilePath="%SystemDrive%\inetpub\custerr" path="502.htm" />
</httpErrors>
我怎样才能摆脱这种配置错误的,所以我可以看到详细的错误?
这是不可能upvote你足够。我在我的网站根目录中有一个web.config。从那里删除everythign。 yayayayayayaya !!!!!!!! – Joel 2010-04-08 14:40:27
http://stackoverflow.com/questions/4358339/how-to-prevent-iis7-for-handling-http-status-code-401 – Jared314 2011-01-18 19:43:58
我有iis7.5和vs2013,这个属性是不允许在配置文件,在尝试推进之后,错误仍然出现。 – DanielV 2015-09-15 06:56:36