Unhandled exception not caught by either Global.asax error handler or custom IHttpModule error handler

Deadly 提交于 2019-12-05 05:37:18

It turned out that the problem was caused because the DPCal_EventMove method was executing as a page callback. Fortunately, the DayPilot calendar component has an option to change this behavior. Once I changed the EventMoveHandling property of the DayPilot:DayPilotCalendar control to "PostBack" instead of "CallBack", I was able to catch and handle the security exception.

Have you tried:

public class Global : System.Web.HttpApplication
{
    protected void Application_Error(object sender, EventArgs e)
    {
        Server.Transfer("~/GlobalExceptionHandler.aspx?ReturnUrl=" + Request.Path);
    }
}

Add:

private void Page_Error(object sender, System.EventArgs e)
{
        //errorcode
}

To your page's code and see if that is called during an error?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!