protected void Page_Load(object sender, System.EventArgs e)
{
// Register that the page has been accessed in a log file.
string MyUID = DateAndTime.Now.Ticks.ToString();
string LogPath = Server.MapPath("~") + "\\Trap";
try {
if (!Directory.Exists(LogPath)) {
Directory.CreateDirectory(LogPath);
}
FileStream tfs = new FileStream(LogPath + "\\" + "BOT_" + MyUID + ".txt", FileMode.Create, FileAccess.Write);
StreamWriter s = new StreamWriter(tfs);
s.BaseStream.Seek(0, SeekOrigin.End);
s.WriteLine(Request.ServerVariables("ALL_RAW") + Constants.vbCrLf + Request.UserHostAddress());
s.Flush();
s.Close();
s.Dispose();
tfs.Dispose();
} catch (Exception ex) {
// Do error handling here
}
}