public static void LogError(string strMessage, string strStackTrace) { try { cErrorLog obj = new cErrorLog(); obj.CreateLogFile(); obj.WriteLog(strMessage, strStackTrace); } catch (Exception e) { HttpContext.Current.Response.Write(e.Message); } }