开发者

Exceptions in N2cms page

i'm using n2cms + asp.net mvc, when the site is uploaded to a webserver, and an exception is thrown in the aspx page, the page appear blank, and there is nothing in the page, even if i turned off the CustomErrors in web.config

but when the site is running on my 开发者_如何学运维computer visual studio simply show me the exception,

is there a way to catch the exception in this situation?


This may be due to your hosting configuration. You could take a look at ELMAH for an easy way of logging exceptions.


You can handle all global errors in your Global.asax's method called Application_Error - http://msdn.microsoft.com/en-us/library/24395wz3.aspx . It will work for simple cases. But I strongly recommend to use ELMAH


N2CMS makes calls to SwallowExceptions(). This is why you are receiving a blank page instead of an exception. You could look for that method call and comment it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜