void OnBeginRequest(object sender, System.EventArgs e) { if (HttpContext.Current.IsDebuggingEnabled) { var stopwatch = new Stopwatch(); HttpContext.Current.Items["Stopwatch"] = stopwatch; stopwatch.Start(); } }