public void ErrorLog() { try { System.Web.HttpResponse response = System.Web.HttpContext.Current.Response; response.Clear(); response.ContentType = "application/octet-stream"; response.AppendHeader("Content-Disposition", "attachment; filename=ErrorFile.txt"); string path = System.Web.HttpContext.Current.Server.MapPath("~/ErrorFile.txt"); response.TransmitFile(System.Web.HttpContext.Current.Server.MapPath("~/ErrorFile.txt")); response.Flush(); response.End(); } catch (ThreadAbortException ex) { Console.Write(ex.ToString()); } catch (Exception ex) { Console.Write(ex.ToString()); } finally { //HttpContext.Current.Response.End(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)