RadUpload does not show the progress bar.

Thread is closed for posting
2 posts, 0 answers
  1. Amitabh
    Amitabh avatar
    1 posts
    Member since:
    Jun 2010

    Posted 23 Mar 2011 Link to this post

    I am using the RadUpload control along with the Rad Progress bar. This was working fine for more than year. Recently we had to add another HttpModule to track the Url in our website. Since then the Rad Progress bar does not show at all. I even downloaded the latest Telerik demo project and added  a simple TestModule. This also breaks the Rad Progress bar.   

    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.Web;
    using System.Configuration;
    namespace HttpModules
        public class TestModule : IHttpModule
            protected log4net.ILog logger = log4net.LogManager.GetLogger("File");
            public void Init(HttpApplication app)
                app.BeginRequest += new EventHandler(OnBeginRequest);
            public void OnBeginRequest(Object sender, EventArgs e)
                    logger.InfoFormat("TestModule => OnBeginRequest");
                    HttpApplication app = (HttpApplication)sender;
                    HttpContext context = app.Context;
                    logger.InfoFormat("TestModule => This is just a Test module");
                    if (IsTelerikRequest(context.Request))
                    string source = context.Request["source"];
                    if (!string.IsNullOrEmpty(source))
                        logger.InfoFormat("TestModule => source is {0} ", source);
                catch(Exception ex)
                    logger.Error("Error in Test Module", ex);
            private bool IsTelerikRequest(HttpRequest httpRequest)
                logger.InfoFormat("TestModule => IsTelerikRequest (httpRequest.RawUrl : '{0}')", httpRequest.RawUrl);
                return httpRequest.RawUrl.Contains("RadUploadProgressHandler.ashx");
            private static bool IsAjaxRequest(HttpRequest request)
                if (request == null) 
                    throw new ArgumentNullException("request");
                return (request["X-Requested-With"] == "XMLHttpRequest") || ((request.Headers != null) && (request.Headers["X-Requested-With"] == "XMLHttpRequest")); 
            public void Dispose() 
  2. Dimitar Terziev
    Dimitar Terziev avatar
    1266 posts

    Posted 29 Mar 2011 Link to this post

    Hello Amitabh,

    Your problem seems to be related to the fact that calling " context.Request["source"] " parses (uploads) everything which in turn leaves RadUpload with an empty request. Hence no progress is displayed. There are two possible workarounds:
    1. Don't use Request.Params in your code. Use Request.QueryString instead. It does not force the upload.
    2. Put your logic in some event which occurs after RadUpload's progress handling - for example PostRequestHandlerExecute (which is where RadUpload stops processing the request) or EndRequest (which is fired at the end of each request).

    Best wishes,
    Dimitar Terziev
    the Telerik team
Back to Top