public static void LogError (string errorMsg)
{
string path = HttpContext.Current.Server.MapPath("/App_Data/errorlog.txt");
using (StreamWriter sw = File.AppendText(path))
{
sw.WriteLine(DateTime.Now + " : " + errorMsg + Environment.NewLine + Environment.NewLine);
}
}