当前位置:编程学习 > asp >>

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");  
        }  
补充:Web开发 , ASP.Net ,
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,