Esempio n. 1
0
 protected void Application_EndRequest(object sender, EventArgs e)
 {
     if (MiniProfilerHelper.IsEnabled())
     {
         MiniProfiler.Stop();
     }
 }
Esempio n. 2
0
        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();
            }
        }