protected void Application_EndRequest(object sender, EventArgs e) { if (MiniProfilerHelper.IsEnabled()) { MiniProfiler.Stop(); } }
protected void Application_BeginRequest(object sender, EventArgs e) { if (MiniProfilerHelper.IsEnabled()) { MiniProfiler.Start(); } string filePath = HttpContext.Current.Request.PhysicalPath; if (!string.IsNullOrEmpty(filePath) && (filePath.IndexOf("Images") >= 0) && !System.IO.File.Exists(filePath)) { HttpContext.Current.Response.End(); } }