Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
105
WebUpload FileSizeExceeded results in Global.asax error
posted

I am using the 12.1 WebUpload control.

The control works as excepted except if the file uploaded is too large.  In this case the UploadFinished event fires with e.FileStatus = Infragistics.Web.UI.EditorControls.UploadStatus.FileSizeExceeded.  Since the upload is not valid I return, but the page still sends a post request to "/ig_fua34sf345sdf13sdf3454erdsf2345asd3425df5235d54df345.aspx?key=qnyBdolkJb5frwLmgoRfmC0dkSh9fM&cid=5be9523d-dd21-4a3e-8788-494a72cadf82".

This post fails, resulting in Global.asax logging the failure.

As far as I can tell, this is the URL where progress updates are normally requested from.

I tried to cancel the upload, but since the UploadStarting and UploadFinishing events are not fired (goes strait to the UploadFinished event) and the UploadFinished event does not have a cancel option, this is not possible.

How do I prevent this error?  or is this a bug with the control?

Code:

Protected Sub webUpload1_UploadFinished(ByVal sender As Object, ByVal e As Infragistics.Web.UI.EditorControls.UploadFinishedEventArgs) Handles webUpload1.UploadFinished
If e.FileStatus <> Infragistics.Web.UI.EditorControls.UploadStatus.Finished Then Return ' 'If file is not finished then it is in some sort of error state and does not need to be processed.
'Process the uploaded file.
End Sub

Exception:

ErrorType:   System.Web.HttpException
Message:    The file '/ig_fua34sf345sdf13sdf3454erdsf2345asd3425df5235d54df345.aspx' does not exist.
Source:       System.Web
StackTrace:

at System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound)
at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp)
at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
at System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)
at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Data (0):