/// <summary>
        /// Executes when the request ends.
        /// </summary>
        protected virtual void OnEndRequest(HttpContextBase context)
        {
            if (context.Request.CurrentExecutionFilePath.ToLower().EndsWith(".gif") ||
                context.Request.CurrentExecutionFilePath.ToLower().EndsWith(".jpg") ||
                context.Request.CurrentExecutionFilePath.ToLower().EndsWith(".png") ||
                context.Request.CurrentExecutionFilePath.ToLower().EndsWith(".js") ||
                context.Request.CurrentExecutionFilePath.ToLower().IndexOf("asset.axd") >= 0)
            {
                return;
            }

            OnPerRequestTasksDisposing();
            Bootstrapper.DisposePerRequestTasks();
            OnPerRequestTasksDisposed();
        }
Example #2
0
 /// <summary>
 /// Executes when the request ends.
 /// </summary>
 protected virtual void OnEndRequest(HttpContextBase context)
 {
     OnPerRequestTasksDisposing();
     Bootstrapper.DisposePerRequestTasks();
     OnPerRequestTasksDisposed();
 }