在IIS 7上调试500错误 [英] Debugging 500 Error on IIS 7
本文介绍了在IIS 7上调试500错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
希望有人可以帮助我.我已经尝试了以下所有解决方案:
Hope someone can help me. I have tried all of the following solutions:
- 向浏览器发送错误是真的
- 错误模式详细
- 启用父母路径为真
但是IIS仍在加载项目文件夹中的文件 Errors/500.aspx ,我无法调试错误.
But still the IIS is loading the file Errors/500.aspx that is in the project folder and I cannot debug the error.
这是我的 Web.config 文件.即使自定义错误模式为关闭",它仍会加载自定义Errors/500.aspx文件.
This is my Web.config file. Even if custom error mode is Off it's still loading custom Errors/500.aspx file.
推荐答案
确保您的浏览器配置为显示错误,例如在IE中:
Make sure your browser is configured to show errors, like in IE:
- 关闭浏览器中的友好错误消息选项,如下所示:
- 在Internet Explorer中的工具"菜单上,单击"Internet选项".
- 在高级"选项卡上的浏览"部分下,单击以清除显示友好的HTTP错误消息"复选框,然后单击确定".
- 关闭浏览器.
- Turn off the friendly error message option in the browser as follows:
- In Internet Explorer, on the Tools menu, click Internet Options.
- On the Advanced tab, under the Browsing section, click to clear the Show friendly HTTP error messages check box, and then click OK.
- Close the browser.
打开IIS中的详细错误.
Turn on detailed errors in IIS.
- Internet信息服务(IIS)管理器->您的网站->错误页面->编辑功能设置->选择详细错误"
确保您的web.config不包含任何节点,例如:
Make sure your web.config does not have any nodes like:
<httpErrors> <error statusCode="500" path="/somedir/500.asp" responseMode="ExecuteURL" /> </httpErrors>
和
<customErrors mode="RemoteOnly" defaultRedirect="~/404error.aspx" />
这篇关于在IIS 7上调试500错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文