开发者

Application_Error event global.asax not getting triggered

In my Application the exception handling was not done in a proper way.

so need to implement the exception handling using "Application_Error" Event. Here the problem is that the event is not getting triggered in some cases. The scenarios in which this happens are开发者_如何学编程 not specific.

Any one can help me out in this. What can be done to trigger this event?


You are using global page for catching the error...and it will trigger only for unhandled exceptions so check for try catch blocks and if there is case like that then throw exception.


If you are running a multi-threaded app then this might help

        AppDomain currentDomain = AppDomain.CurrentDomain;
        currentDomain.UnhandledException +=
            (s, args) =>
                {
                    Debugger.Break();
                };
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜