Welcome Guest Search | Active Topics | Sign In | Register

AjaxUploader limiting upload file size Options
KrisR
Posted: Friday, August 27, 2010 12:23:11 PM
Rank: Newbie
Groups: Member

Joined: 8/27/2010
Posts: 5
I am currently trying ajaxuploader and I went through your docs but couldn't find anything related to limiting upload file size ?

Did I miss it some where ?

Thanks

KrisR
Posted: Friday, August 27, 2010 12:35:07 PM
Rank: Newbie
Groups: Member

Joined: 8/27/2010
Posts: 5
I see the maxdatasize field now however even when its setup to lets say 10mb and you and upload 20mb file, it will only give you the debug error message after it uploads the first 10mb of the file which I think is a waste..

if there any workarounds so when user tries to upload a file bigger then maxuploadsize it immediately tells it ?
eo_support
Posted: Friday, August 27, 2010 12:40:26 PM
Rank: Administration
Groups: Administration

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

The file size is embedded in the HTTP request header and it is checked immediately after the request reaches the server. This occurs before the whole file data has been transferred to the server. So there should be no waste on that.

Thanks!
KrisR
Posted: Friday, August 27, 2010 12:47:06 PM
Rank: Newbie
Groups: Member

Joined: 8/27/2010
Posts: 5
unfortunately it doesnt work that way

you can check it out here:

http://66.90.127.32/eo/default.aspx

MaxDataSize property is currently set to 10240 kilobytes which should be 10MB

you can try and upload anything over this and observe
eo_support
Posted: Friday, August 27, 2010 12:58:53 PM
Rank: Administration
Groups: Administration

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

Please check whether you have other HttpModules in your application or whether you have ASP.NET tracing enabled. A module sits in the ASP.NET request pipe line. If it sits in front us in the pipe line, then the request will reach that module first. If that module decides to examine the whole request data before handling any of the data to us (ASP.NET tracing does this), then you will see the whole uploading process sits there for a long time before we can do anything. When this happens, the progress bar usually won’t move at all while you upload.

There is practically nothing we can do in that case because somebody else was holding the data before us. You can confirm whether this is the case by trying the uploader is a blank new project (or you can verify it with our sample project). Once you get the test project working, you can compare the two project (I suggest you start with httpModules section in your web.config) to find out the triggering point.

Thanks
KrisR
Posted: Friday, August 27, 2010 1:14:19 PM
Rank: Newbie
Groups: Member

Joined: 8/27/2010
Posts: 5
Hi,

I have checked that already with no luck

my web.config looks like this:

<system.web>
<trace enabled="false" pageOutput="false" requestLimit="40" localOnly="false"/>
<httpModules>
<add name="EOWebRuntime" type="EO.Web.Runtime,EO.Web"/>
</httpModules>

no other modules are loaded except EO, tracing is also disabled

I am observing the same exact behavior on your demo page as well

http://demo.essentialobjects.com/Demos/AJAX%20Uploader/Standard%20Features/Demo.aspx
eo_support
Posted: Friday, August 27, 2010 1:56:34 PM
Rank: Administration
Groups: Administration

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

Please verify the error message you received. If the upload was aborted due to MaxDataSize is reached, the message should read:

...... The size of the submitted data exceeded the maximum allowed size......

This can be very easily confused with another common error:

...... AJAX call to the server times out......

You should recieve the first message right away if it is because of MaxDataSize. However the second message is only triggered after about 10 seconds. During those 10 seconds you will not see progress bar move.

The most common reason for the second error message (as it was on our live demo site) is the default IIS 7 input size filter. By default IIS 7 ignores a request when the whole data size exceeds a certain limits. This value was about 30M on our demo site (coincidently, it's the value we set in our demo). Thus if you try to upload a file over that size, the request will be ignored by the server and you will receive the time out error. Note the time out error does not occurs immediately --- it occurs after it has not received any response from the server after the time out.

To correct this error, you will need to increase the IIS 7 request limit. To increase the limit, add the following requestFiltering entry in your web.config (do not duplicate other entries such as the root <configuration> element):

Code: HTML/ASPX
<configuration>
   <system.webServer>
      <security>
         <requestFiltering>
            <requestLimits maxAllowedContentLength="100000000"/>  
         </requestFiltering>
      </security>
   </system.webServer>
</configuration>


The above sample set the request limit to 100M.

We have just adjusted increased our demo site limit from 30M to 100M. So if you try to upload anything between 30M to 100M (the actual allowed size will be smaller because of encoding overhead), you should get the "data exceeded the maximum allowed size" error right away.

Theoretically it is possible to receive the same error on IIS 6 as well. However from our experience, the error almost always occurs on IIS 7. The steps for IIS 6 is different. Please see this link for more details:

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

Please feel free to let us know if you still have problems.

Thanks!
KrisR
Posted: Friday, August 27, 2010 2:12:33 PM
Rank: Newbie
Groups: Member

Joined: 8/27/2010
Posts: 5
you are correct sir, that fixed it

Thank you !
eo_support
Posted: Friday, August 27, 2010 2:22:28 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,098
Great. Glad that it works for you.

Thanks!


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.