Welcome Guest Search | Active Topics | Sign In | Register

AjaxUploader MaxDataSize Options
Mike Reeder
Posted: Wednesday, October 5, 2011 5:23:04 PM
Rank: Newbie
Groups: Member

Joined: 6/17/2008
Posts: 5
It appears that if i try to upload a file whose size is > MaxDataSize on the control that the file must be read before it's size is determined? When i try to upload a large file, the page sits for a long time before throwing a timeout error or a "max_size_exceeded" error (which i alert in js function specified on the ClientSideOnError attribute of the control).
Files only slightly larger come right back with the error.
Any suggestions. Should i verify max file size outside of the AjaxUploader control then somehow feed it the file if it's under the max size?
eo_support
Posted: Wednesday, October 5, 2011 5:31:56 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

No. That's because your IIS ignores the request. Check IIS 7 request filtering in this topic:

http://doc.essentialobjects.com/library/1/ajaxuploader/troubleshoot.aspx

Say our limit is 30M and IIS's limit is 100M, then:

1. If you upload a 10M file, then it works fine because it goes through both limits with no problem;

2. If you upload a 40M file, then IIS will let it through right away and it will hit us. We will determine that you are over our limits and send an error message to client side right away telling you that you are over limit;

3. If you upload a 120M file, then IIS will INGORE the request because it's over IIS's limit. In that case the request will never reach us. Eventually you will get a time out in this case;

This is a security feature built-in with IIS to avoid server being flooded with large requests. So you probably do not want to turn it off completely. That means there will always be a limit that would trigger a time out for you.

Thanks


Mike Reeder
Posted: Wednesday, October 5, 2011 9:33:57 PM
Rank: Newbie
Groups: Member

Joined: 6/17/2008
Posts: 5
Thanks for your reply. It helps to know what's going on! Could i avoid the problem altogether by getting the file outside the AjaxUploader control, checking it's filesize and then, if it's under my max size somehow feed the file to the AjaxUploader control for it to upload? That way i don't run into the IIS limit if it's possible to feed the pre-selected file into the Uploader control.
eo_support
Posted: Wednesday, October 5, 2011 9:50:19 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
No. You can not. You can not peek a file's size on the client side (security measure again!). The browser has to send a request to the server with the file content along with the file size in the header. Only after that you will have the "security clearance" to check on the file. That means any checking on the file size or the content are done on the server side. IIS would first check the size in the header and if it that exceeds the limit, it simply drops the request so that the remaining of the file data doesn't get sent. We do something very similar, all happening on the server side.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.