Asp.net 全局错误处理

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");

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

Grow your business fast with

Suku