C#: Log A Message To A File
// Put this at the top using System.IO; // public static void Log(string Message) { File.AppendAllText(HttpContext.Current.Server.MapPath("~") + "/log.txt", DateTime.Now.ToShortDateString() + " " + DateTime.Now.ToShortTimeString() + ": " + Message + Environment.NewLine); }