Using FileExplorer with Large number of Files or directories.

2 posts, 0 answers
  1. Eman
    Eman avatar
    1 posts
    Member since:
    Jan 2012

    Posted 08 Jan 2012 Link to this post

    We have used RadFileExplorer control in our CMS. First problem we faced when number of files increases on the production server, FileExplorer become very much slow. In order to overcome this problem, We have implemented Custom FileSytem Content provider. In which we have manually populated the tree. After using that speed / performance has become incredibly improved. 

    But after that there is another problem arises, if any folder in the root level or deep in the hierarchy contains files or folder more than 10,000 to 13000, that particular root directory did not open and its giving the error

    "Error during serialization and deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property."  

    I know this error is occurring due to the size of the response data become greater than the value for maxJsonLength property. Even when i have set the MAXIMUM value for this property in Web.Config, it had no effect. 

    I thought that it was the problem with my implementation of Custom Content Provider, but when i remove my Custom Provider the problem and this error was still there.

    I have also tried by setting AllowPaging Property to "True", But AllowPaging property can only work with Grid not with Tree.

    I seems that FileExplorer is not meant for dealing with situations, when file hierarchy and the number of files become very large in number.

    I was thinking to customize the behavior of FileExplorer that it should not returned the Ajax Response using JSON, Remember, when we click on tree node in the tree view of file explorer, by default Ajax request is sent to server and get the data back in the form of JSON string. If there is a way that we can disable this Asynchronous call and execute postback then I think this issue can be solved but I dont know how and in which client side method this call can be sent. Please help me in this regards.

    Or suggest any better option to deal with if the number of files has become very large.

    Thank you very much and have a nice day

    Eman Ali Mughal

  2. Dobromir
    Dobromir avatar
    1633 posts

    Posted 11 Jan 2012 Link to this post

    Hi Eman,

    The RadTreeView used in RadFileExplorer is configured to using Client-Side ExpandMode for its nodes to increase the overall performance of the control. In this configuration, the HTML for the nodes that will be displayed is returned from the server with the JSON string and this is causing the reported error to occur when trying to load folder with more than 10000 sub-folders.

    At present, this behavior cannot be modified and unfortunately, I am unable to provide suitable workaround for this case.

    Best Regards,
    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
  3. DevCraft R3 2016 release webinar banner
Back to Top