Asp.net 全局错误处理

来源:互联网 发布:贵阳市小河区淘宝地址 编辑:程序博客网 时间:2024/05/19 01:33
protected void Application_Error(object sender, EventArgs e)        {            Exception ex = this.Server.GetLastError().GetBaseException();            if (ex is ArgumentErrorException)            {                return;            }            LogHelper.CurrentLogger.Error("出现未预计的异常", ex);            this.Response.Redirect("/Error.aspx");        }

原创粉丝点击