RadAsyncUploadControl | Doesnot behave consisting between IE and FF in Network Load balanced enviroment

Thread is closed for posting
2 posts, 0 answers
  1. Radhakrishna
    Radhakrishna avatar
    1 posts
    Member since:
    Apr 2012

    Posted 24 Apr 2012 Link to this post

    We are using RadAsyncUploadControl version Q3 2011, in our SharePoint 2007 application.

    The issue is happening in a load balanced environment. Firefox 11 and Chrome 18 (doesn’t happen in IE and Safari) are splitting the request for one large into small packets and sending them as different requests (It is not our code. May be it’s the way Telerik works). Because of the load balancing these requests are going to multiple WFE servers. Since, we have the Temp folder as a local path these small packets are getting saved to multiple web front ends. So, finally when it gets copied to the Target folder it is copying only the last packet.

    The solution to the problem is to have a Shared UNC Path for the Temp location. We tried changing the temp location to a UNC Path but it didn’t work as Impersonation was turned on in web.config for all our web applications. We turned off the impersonation and then tried uploading a large file from Firefox and it worked fine. We were able to upload a 12MB file successfully and the Size is displaying correctly on the Confirmation screen as well. But turning impersonation off may not the correct approach as it could impact the whole web application.

    In order to work around this problem, we set the temp location to a Local Path on WFE and then in our Custom Http Handler 'AsyncUploadHandler' (runs under elevated privileges) we are resetting this to the Shared UNC Path before copying the file to the Temp Location. While this approach is working fine for IE and Safari, this is still an issue for Firefox 11 and Chrome 18. Firefox 11 and Chrome 18 are trying to the copy the file to the Temp Folder first and then pass the request to the Custom HttpHandler where as in IE the request comes directly to the Custom Http Handler and then upon our code execution the file is getting copied to the Temp Folder

    Query we have are:
    1.) Why RadAsynUploadControl breaks files in smaller chunks for FF and Chrome only and not for IE and Safari? Is there a way to rectify without following the work around? Is there any speacial settings for RadAsynUploadControl to make it work under NLB environment?
    2.) In work around mentioned above related to setting temp location, why custom http handler code gets executed first in case of FF and Chrome and not in case of IE and Safari?

    If anyone has faced similar issue and have resolved it, please let me know.


  2. Peter Filipov
    Peter Filipov avatar
    1028 posts

    Posted 27 Apr 2012 Link to this post

    Hello Radhakrishna,

    Could you confirm that you are overriding (resetting) the TemporaryFolder property of the Custom Handler as follows:

    public override string TemporaryFolder
            return "Custom UNC path";
            TemporaryFolder = value;

    In case that you are facing the same problem after overriding the TemproraryFolder property, please add the following javascript right before the declaration of the RadAsyncUpload control and set DisablePlugins to true:

    Telerik.Web.UI.RadAsyncUpload.Modules.FileApi.isAvailable = function() { return false; };
    The above javascript code will force the RadAsyncUpload control to use IFrame module to upload files.

    1. Under Firefox and Chrome the RadAsyncUpload control is using FileApi module to upload files. The module is uploading files on chunks (2MB each). Because of the ASP.NET framework limitation - 4MB maximum on request. The only thing (without impersonation limitation) to make the RadAsyncUpload control work is to upload the files into a shared folder.

    2. When using FileApi module the Process method of the Handler is executed after the file is assembled. In case that you are using IFrame module the file is sent as an entity and you have a direct reference to it.

    We are aware of that limitation and we are going to resolve it for the next releases. To avoid duplication of the threads, please let us continue our discussion in only one of them.

    Peter Filipov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top