如何设置 web.config 文件以显示完整的错误消息 [英] How to set web.config file to show full error message
本文介绍了如何设置 web.config 文件以显示完整的错误消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在 Windows Azure 上部署了我的 MVC-3 应用程序.但是现在当我通过 staging url
请求它时,它会显示我(抱歉,处理您的请求时出错.).现在我想查看完整的错误消息,由于某些安全原因,默认情况下它会隐藏该消息.我知道我们可以通过 web.config 文件来做到这一点.但是如何?
I deployed my MVC-3 application on windows Azure. But now when I am requesting it through staging url
it shows me (Sorry, an error occurred while processing your request.). Now I want to see the full error message, by default it is hiding that because of some security reasons. I know that we can do this through web.config file. But how?
推荐答案
不确定它是否适用于您的方案,但尝试将以下内容添加到 < 下的
:web.config
;system.web>
not sure if it'll work in your scenario, but try adding the following to your web.config
under <system.web>
:
<system.web>
<customErrors mode="Off" />
...
</system.web>
适用于我的实例.
另见:
这篇关于如何设置 web.config 文件以显示完整的错误消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文