Upload MaxUploadSize

15 posts, 0 answers
  1. Chris
    Chris avatar
    20 posts
    Member since:
    Jan 2009

    Posted 01 Jul 2009 Link to this post

    My web application has a Max Request Length of 20 MB

    I set Configuration.MaxUploadFileSize on my RadFileExplorer to 10 MB from the code-behind.

    The control successfully catches files between 10 MB and 20 MB. However, any files more than 20 MB cause ASP.NET to throw an exception.

     

  2. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 02 Jul 2009 Link to this post

    Hi Chris,

    I am not quite sure what may cause the issue on your side. I used the provided information and prepared a test project but I was not able to reproduce the problem. For your convenience I have attached my test project to the thread. Could you please test it and let me know how it goes on your side?
    In my project I override the default <httpRuntime> settings in the local web.config file, that is included in the attached project.

    I hope this helps.

    Regards,
    Fiko
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Chris
    Chris avatar
    20 posts
    Member since:
    Jan 2009

    Posted 02 Jul 2009 Link to this post

    Thanks for the code. From my reading, it looks like the FileExplorer control sets the max at 15MB and the web.config sets the max at 20MB.

    I ran this code and tried to upload a 30 MB file, and I got an HTTP error page. This was my previous issue. This is the error I get:

    HTTP Error 404.13 - Not Found

    The request filtering module is configured to deny a request that exceeds the request content length.


    It is useful for me for the maxRequestLength specified for the entire app to be larger than the MaxUploadFileSize (for the FileExplorer control).
  5. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 08 Jul 2009 Link to this post

    Hello Chris,

    The value of the MaxUploadFileSize property of the RadFileExplorer control should be less than the value of the maxRequestLength property.

    All the best,
    Fiko
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. Chris
    Chris avatar
    20 posts
    Member since:
    Jan 2009

    Posted 08 Jul 2009 Link to this post

    I'm sorry that I'm not being clear. But what you just posted is the case.

    The MaxUploadFileSize is property on the RadFileExplorer is 15 MB.

    The maxRequestLength in the web.config is 20 MB.

    So, "The value of the MaxUploadFileSize property of the RadFileExplorer control should be less than the value of the maxRequestLength property." is true.

    My issue is that I get this error:

    HTTP Error 404.13 - Not Found

    The request filtering module is configured to deny a request that exceeds the request content length.

    ... when I try to upload a 30 MB file using the code you provided for me.

  7. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 09 Jul 2009 Link to this post

    Hello Chris,

    The RadFileExplorer control is based on the ASP.NET Framework and the behavior that you experience is the expected one in your case. Please note that the error is not caused by the RadFileExplorer control, but by the Framework itself and the RadUpload control (that is embedded in the RadFileExplorer) does not provide a way for handling this error. More details on the subject can be found on this help page.

    Your scenario :
    The issue in your case occurs because the uploaded file is larger than the value set in maxRequestLength and in this case the Framework rejects the browser's request. In this case the RadFileExplorer's code does not get executed.

    I hope this helps.

    Kind regards,
    Fiko
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  8. Chris
    Chris avatar
    20 posts
    Member since:
    Jan 2009

    Posted 09 Jul 2009 Link to this post

    Ok, that makes sense. Thanks!
  9. Tomasz M.Lipiński
    Tomasz M.Lipiński avatar
    71 posts
    Member since:
    Nov 2009

    Posted 27 Jan 2010 Link to this post

    Hi,
    as I understand after reading this thread and doing some experiments:
    - when the file size is between MaxUploadFileSize and maxRequestLength of httpRuntime web.config section, the appropriate message is displayed by the explorer
    - when the file size is above maxRequestLength, the error cannot be trapped by the explorer and therefore I get a general error message
    Is it true?

    Regards
    Tomasz
  10. Tomasz M.Lipiński
    Tomasz M.Lipiński avatar
    71 posts
    Member since:
    Nov 2009

    Posted 27 Jan 2010 Link to this post

    Hi,
    And there is another issue: trying to upload a file larger than it is allowed by web.config raises an error. This error for some reasons cannot be displayed - I get a page saying that "... requested web page cannot be displayed...". It is so regardless whether I provide my own error page or use the built-in one.
    How to catch and display such an error?

    Regards
    Tomasz
  11. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 01 Feb 2010 Link to this post

    Hi Tomasz,

    Indeed, if the uploaded file exceed the size set to the maxRequestLength in web.config, then the RadFileExplorer does not handle the file. The file in this case is handled by the ASP.NET framework only and it disconnects the connection. More details on the subject can be found in this blog post. As described in the blogpost, the connection with the client's browser is closed automatically by the ASP.NET and this is why that error cannot be handled in order to show a custom message.

    I hope this information helps.

    Sincerely yours,
    Fiko
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  12. Tomasz M.Lipiński
    Tomasz M.Lipiński avatar
    71 posts
    Member since:
    Nov 2009

    Posted 02 Feb 2010 Link to this post

    Hi,

    Yes, I've also digged out the Internet I found explanations.
    I've also found some interesting solution here:
    http://www.netnewsgroups.net/group/microsoft.public.dotnet.framework.aspnet/topic30226.aspx
    It uses Microsoft's ActiveX to check file sizes at the client side. I haven't tried it but if it worked it could be a kind of (optional) solution.

    Regards
    Tomasz
  13. John Chatt
    John Chatt avatar
    24 posts
    Member since:
    Feb 2010

    Posted 22 Mar 2011 Link to this post

    I am getting the same error except my max request length is 30mb so anything over 30mb errors like this

    HTTP Error 404.13 - Not Found

    The request filtering module is configured to deny a request that exceeds the request content length.

     our web application used to use another control for uploads (CuteWebUI) and it was not affected by the max request length, I believe they do so by breaking the stream up somehow during the upload (speculation). I could easily upload files larger than 30mb even with the max request length set to 30mb. This was ok though because we were limiting their uploads with the MaxUploadSize. So if we wanted a MaxUploadSize larger than the MaxRequestLength we could do that.

    but when we switched over to RadUpload we came across this issue. Are there plans to bypass the max request length and limit radUploads by the MaxUploadSize alone?? 

  14. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 23 Mar 2011 Link to this post

    Hi John,

    The issue happens, because IIS is rejecting the request. To configure IIS to allow larger file uploads, please consult with the following helpful article (under the sections "Settings for IIS7").

    Regards,
    Peter Filipov
    the Telerik team
  15. John Chatt
    John Chatt avatar
    24 posts
    Member since:
    Feb 2010

    Posted 23 Mar 2011 Link to this post

    thank you Peter,

    I am aware of what you are referring to. If you notice my question was not actually addressed by your link. I know why I am getting that error and how to modify the MaxRequestLength but I do not want to do this. What I asked was if telerik ever plans on circumventing it in a way similar to that of a control we are currently using (CuteWebUI's uploader).

    I want the upload size to only be limited by limitations we put on the control itself and to ignore the MaxRequestLength.

    So again I ask,

    Is this something you guys are even looking into or should we stick with the other third party control?
  16. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 28 Mar 2011 Link to this post

    Hi John Chatt,

    Please excuse me for not understanding you correctly. RadAsyncUpload control supports breaking file into chunks(Silverlight module) and this will allow clients to upload files larger than MaxRequestLength as long as they have Silverlight installed.

    Kind regards,
    Peter Filipov
    the Telerik team
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017