This is a migrated thread and some comments may be shown as answers.
Upload MaxUploadSize
14 Answers 238 Views
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 01 Jul 2009, 05:09 PM
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.

 

14 Answers, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 02 Jul 2009, 03:31 PM
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.
0
Chris
Top achievements
Rank 1
answered on 02 Jul 2009, 05:05 PM
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).
0
Fiko
Telerik team
answered on 08 Jul 2009, 07:13 AM
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.
0
Chris
Top achievements
Rank 1
answered on 08 Jul 2009, 03:12 PM
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.

0
Fiko
Telerik team
answered on 09 Jul 2009, 03:46 PM
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.
0
Chris
Top achievements
Rank 1
answered on 09 Jul 2009, 07:34 PM
Ok, that makes sense. Thanks!
0
Tomasz M.Lipiński
Top achievements
Rank 1
answered on 27 Jan 2010, 12:01 PM
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
0
Tomasz M.Lipiński
Top achievements
Rank 1
answered on 27 Jan 2010, 02:46 PM
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
0
Fiko
Telerik team
answered on 01 Feb 2010, 12:52 PM
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.
0
Tomasz M.Lipiński
Top achievements
Rank 1
answered on 02 Feb 2010, 10:02 AM
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
0
John Chatt
Top achievements
Rank 1
answered on 22 Mar 2011, 03:32 PM
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?? 

0
Peter Filipov
Telerik team
answered on 23 Mar 2011, 12:49 PM
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
0
John Chatt
Top achievements
Rank 1
answered on 23 Mar 2011, 06:55 PM
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?
0
Peter Filipov
Telerik team
answered on 28 Mar 2011, 10:19 PM
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
Asked by
Chris
Top achievements
Rank 1
Answers by
Fiko
Telerik team
Chris
Top achievements
Rank 1
Tomasz M.Lipiński
Top achievements
Rank 1
John Chatt
Top achievements
Rank 1
Peter Filipov
Telerik team
Share this question
or