1.新建Golbal.asax 代码如下:void Application_Error(object sender, EventArgs e) { Exception objErr = Server.GetLastError().GetBaseException(); string error = “发生异常页: ” + Request.Url.ToString() + “”; error += “异常信息: ” + objErr.Message + “”; Server.ClearError(); Application[“error”] =