Handle Application Errors In Application to avoid the handle Errors and maintain the Errors data use the following code.... FileName: Global.asax void Application_Error(object sender, EventArgs e) { // Code that runs when an unhandled error occurs try { string str = Server.MapPath("~/logs/") + MyTime.Now().ToString("MMddyyyyHHmmss.err") ; Exception objErr = HttpContext.Current.Server.GetLastError().GetBaseException(); System.IO.File.AppendAllText(str, objErr.ToString()); //Response.Redirect("~/ErrorPage.html"); } ...
ASP.NET || Javascript || Dataobject || Code Solutions Free Open Source code for Developers