I'm sorry if this was previously asked by obviously the fileUploading event (return false) is not the place to Cancel uploading a file in case any criteria like size is not the expected. What would be the proper way to Cancel from the client uploading files, is that possible on the client or it has to be handled on the server?
Great! :)
You are welcome.
Good luck with your application.
All Best,
Martin Pavlov
Infragistics, Inc.
Thank you very much Martin with your last post and handling the files sizes on the server event: webUpload1_UploadStarting I'm really happy with the control.
Best Regards
Elvis
Hello Elvis,
I reproduced your problem and after further investigation I found the following:
If you're using IIS 7 there is a file size limit setting which is described here:
http://support.microsoft.com/kb/942074/ and here:
http://www.webtrenches.com/post.cfm/iis7-file-upload-size-limits
Because I use IIS Express for my test server the change I made in my application web.config is the following:
<system.webServer> <validation validateIntegratedModeConfiguration="false"/> <modules runAllManagedModulesForAllRequests="true"> <add name="IGUploadModule" type="Infragistics.Web.Mvc.UploadModule" preCondition="managedHandler" /> </modules> <handlers> <add name="IGUploadStatusHandler" path="IGUploadStatusHandler.ashx" verb="*" type="Infragistics.Web.Mvc.UploadStatusHandler" preCondition="integratedMode" /> </handlers> <security> <requestFiltering> <requestLimits maxAllowedContentLength="1073741824"/> </requestFiltering> </security> </system.webServer>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules runAllManagedModulesForAllRequests="true">
<add name="IGUploadModule" type="Infragistics.Web.Mvc.UploadModule" preCondition="managedHandler" />
</modules>
<handlers>
<add name="IGUploadStatusHandler" path="IGUploadStatusHandler.ashx" verb="*" type="Infragistics.Web.Mvc.UploadStatusHandler" preCondition="integratedMode" />
</handlers>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="1073741824"/>
</requestFiltering>
</security>
</system.webServer>
Note that in my case I set "maxAllowedContentLength" to be 1GB.
If you're using IIS 6 then you may want to look at this blog post:
http://weblogs.asp.net/mhawley/archive/2004/05/11/129824.aspx
If this solution doesn't work in your case then you may want to check this post suggestions for common errors:
http://blogs.infragistics.com/forums/p/57050/293106.aspx#291612
Best Regards,
Thank you Martin for your help, the file I'm trying to upload is just 700MB and the settings on the we.config are the following:
<appSettings>
<add key="fileUploadPath" value="~/Uploads" />
<add key="maxFileSizeLimit" value="100000000" />
<add key="bufferSize" value="16384" />
<add key="allowedMIMEType" value="*" />
</appSettings>
Hello elvisvr,
What I found is that this error is returned when the file exceeds maximum upload file size which is 2GB. This limitation is described in "igUpload Known Issues" document which you can find here:
http://help.infragistics.com/NetAdvantage/jQuery/Current/CLR4.0/Help/NetAdvantage/jQuery/2011.2/CLR4.0/html/igUpload_Known_Issues.html
Is this your case?
If not, can you provide me with more information like:
Is there an error in your sentence "On fileUploading, cancelUpload is not fired I suppose for the reasons you said.". "cancelUpload" is method, not event. What is your code in "fileUploading" event?
Hope this helps,