1 private void LogWrite(string text) 2 { 3 FileStream fs = new FileStream(this.Server.MapPath("/log.txt"), FileMode.Append); 4 StreamWriter sw = new StreamWriter(fs); 5 sw.WriteLine(text); 6 sw.Close(); 7 fs.Close(); 8 }