如何在远程部署的mvc3应用程序上打开详细错误noitify?

时间:2022-02-06 07:28:36

So, instead of receving the following error on the remote server:

因此,而不是在远程服务器上收到以下错误:

Sorry, an error occurred while processing your request.

很抱歉,在执行您的要求时发生了一个错误。

I get the following (like debugging locally):

我得到以下内容(如本地调试):

Server Error in '/' Application. The UPDATE statement conflicted with the FOREIGN KEY constraint ... ...

'/'应用程序中的服务器错误。 UPDATE语句与FOREIGN KEY约束冲突......

I have

<compilation debug="true" in the web.config>

2 个解决方案

#1


3  

Turn custom errors OFF in your web.config. However a better alternative is to install ELMAH and log the error and have it delivered to you or view it over a secured page.

在web.config中关闭自定义错误。但是,更好的选择是安装ELMAH并记录错误并将其发送给您或通过安全页面查看。

http://code.google.com/p/elmah/

#2


2  

Add <customErrors mode="off" /> to Web.config.

添加到Web.config。

Beware that exposing exception details can have security implications.

请注意,暴露异常详细信息会产生安全隐患。

#1


3  

Turn custom errors OFF in your web.config. However a better alternative is to install ELMAH and log the error and have it delivered to you or view it over a secured page.

在web.config中关闭自定义错误。但是,更好的选择是安装ELMAH并记录错误并将其发送给您或通过安全页面查看。

http://code.google.com/p/elmah/

#2


2  

Add <customErrors mode="off" /> to Web.config.

添加到Web.config。

Beware that exposing exception details can have security implications.

请注意,暴露异常详细信息会产生安全隐患。