Ejemplo n.º 1
0
 /// <summary>
 /// 请求结束时执行
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void OnEndRequest(object sender, System.EventArgs e)
 {
     //by mazq,2012-9-11 过滤掉了异步请求
     if (HttpContext.Current.Request.AcceptTypes.Contains("text/html"))
     {
         if (HttpContext.Current.Request.Headers.Get("X-Requested-With") == null)
         {
             var handler = new TraceHttpHandler();
             handler.ProcessRequest(HttpContext.Current, PetaPocoDatabase.GetTracedSqls(), stopwatchOfResponseTime);
         }
     }
 }