RadUploadModule - Error in web.config

Thread is closed for posting
5 posts, 0 answers
  1. Debashis Pyne
    Debashis Pyne avatar
    66 posts
    Member since:
    Apr 2010

    Posted 25 May 2011 Link to this post


    I have integrated the RadUploadProgress module with my web application.

    Oiwng to this I had to add a new line in my web.config file as below:

    <add name="RadUploadModule" type="Telerik.WebControls.RadUploadHttpHandler, RadUpload.Net2"/>

    The website successfully builds.
    Now when I try to run the application in the debug mode, it generates a runtime error as below:

    Configuration Error 
    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 
    Parser Error Message: Could not load file or assembly 'RadUpload.Net2' or one of its dependencies. The system cannot find the file specified. (E:\Webhome\Power50\Power50UI\web.config line 97)
    Source Error: 
    Line 95:    <!--<add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" />-->
    Line 96:    <add name="RadCompression" type="Telerik.Web.UI.RadCompression" />
    Line 97:       <add name="RadUploadModule" type="Telerik.WebControls.RadUploadHttpHandler, RadUpload.Net2"/>
    Line 98:    </httpModules>
    Line 99:   

    Please suggest how can I get this resolved.


  2. Cori
    Cori avatar
    562 posts
    Member since:
    Jul 2010

    Posted 25 May 2011 Link to this post

    Hello Debashis,

    The line you have commented out is the correct one, where the one you're using is for an earlier version of the controls, when they had each control in their own assembly.

    You can refer to this help article to learn how to register the control in your web.config:


    You need to configure it in two areas, httpModules and httpHandlers.

    I hope that helps.
  3. Vamshi
    Vamshi avatar
    1 posts
    Member since:
    Aug 2011

    Posted 03 Aug 2011 Link to this post

    I am ASP.Net 4.0 ,Telerik file upload and SQL Server 2008.

    When I try to upload big files into the database, I get memory exception. 

    Below is my code

    private void UploadFiles()
                if (RadUpload1.UploadedFiles.Count > 0 )
                     foreach(UploadedFile file in RadUpload1.UploadedFiles)
                         string fileName = file.GetName();
                         //byte[] imageBytes = new byte[file.InputStream.Length + 1];
                         //file.InputStream.Read(imageBytes, 0, imageBytes.Length);
                         //System.Data.Linq.Binary fileBinary = new System.Data.Linq.Binary(imageBytes);

                         Business.IssueAttachment objIssueAttachment = new Business.IssueAttachment(0, issueId, fileName, FileToByteArray(file.FileName), true);
                         objIssueAttachment = null;

            public byte[] FileToByteArray(string _FileName)
                byte[] _Buffer = null;
                // Open file for reading
                System.IO.FileStream _FileStream = new System.IO.FileStream(_FileName, System.IO.FileMode.Open, System.IO.FileAccess.Read);
                // attach filestream to binary reader
                System.IO.BinaryReader _BinaryReader = new System.IO.BinaryReader(_FileStream);
                // get total byte length of the file
                long _TotalBytes = new System.IO.FileInfo(_FileName).Length;
                // read entire file into buffer
                _Buffer = _BinaryReader.ReadBytes((Int32)_TotalBytes);
                // close file reader
                return _Buffer;

    Web.Config Settings

    <httpRuntime requestValidationMode="2.0"  maxRequestLength="2097151" executionTimeout="13000" />

    Do I need to add anything in <httpModules>? Please let me know.

    Also Do I need any ASHX file. If so please send me the code.

  4. Dimitar Terziev
    Dimitar Terziev avatar
    1268 posts

    Posted 08 Aug 2011 Link to this post

    Hi Vamshi,

    Please refer to the following help article giving information what settings should be set in order to be able to upload large files.

    All the best,
    Dimitar Terziev
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  5. Satbir
    Satbir avatar
    4 posts
    Member since:
    Apr 2014

    Posted 21 Jun 2014 in reply to Cori Link to this post

    Hi Cori,

    The link http://www.telerik.com/help/aspnet-ajax/upload-configuration.html is currently not working.

    However, following  web config settings worked for me :
               <add path="Telerik.RadUploadProgressHandler.ashx" validate="false" verb="*" type="Telerik.Web.UI.RadUploadProgressHandler"/>
        <add name="Telerik_RadUploadProgressHandler_ashx" verb="*" preCondition="integratedMode" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" />

Back to Top