protected void ProcessRequest(HttpContext context) { TraceManager manager = HttpRuntime.TraceManager; if (!manager.Enabled || manager.LocalOnly && !context.Request.IsLocal) { throw new TraceNotAvailableException(manager.Enabled); } HtmlTextWriter output = new HtmlTextWriter(context.Response.Output); if (context.Request.QueryString ["clear"] != null) { manager.Clear(); context.Response.Redirect(context.Request.FilePath); } string id_str = context.Request.QueryString ["id"]; int id = -1; if (id_str != null) { id = Int32.Parse(id_str); } if (id > 0 && id <= manager.ItemCount) { RenderItem(manager, output, id); } else { string dir = context.Server.MapPath(UrlUtils.GetDirectory(context.Request.FilePath)); RenderMenu(manager, output, dir); } }