bool HandleNotFound(string path, HttpListenerRequest req, HttpListenerResponse res) { res.ContentType = "text/text"; res.StatusCode = (int)HttpStatusCode.NotFound; res.WriteContent(System.Text.Encoding.UTF8.GetBytes("unknown path: " + path + "\n")); return true; }