Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

AjaxFileUploadHelper.Process(HttpContext context) Thrown Exception is not "Bubbling Up" Properly #573

Open
WestBennett opened this issue Jul 1, 2021 · 0 comments

Comments

@WestBennett
Copy link

The AJAX Control Toolkit <20.1.0.0>

The installation method

A custom build from the source code

Minimal steps to reproduce the bug

  1. Use the AjaxFileUpload control on a webpage, and don't set any value in the AllowedFileTypes property
  2. Use the control on the webpage, and attempt to upload a filetype that isn't listed in the DefaultAllowedExtensions list ("7z","aac","avi","bz2","csv","doc","docx","gif","gz","htm","html","jpeg","jpg","md","mp3","mp4","ods","odt","ogg","pdf","png","ppt","pptx","svg","tar","tgz","txt","xls","xlsx","xml","zip").

Actual result

The user will see the following unhelpful error:
image
The programmer will see the following unhelpful error:
image

Expected result

That both the user and the programmer will see the ACTUAL thrown error:
image

Somewhere between AjaxFileUploadHelper.Process(HttpContext context) and Scripts\AjaxFileUpload.js (or Scripts\AjaxFileUpload.min.js) > doneAndUploadNextFile function, the error is being "whitewashed" away, replaced with "error raising upload complete event and start new upload".

It is my opinion that the true thrown error should be bubbled up to the main assembly, and also displayed to the user, rather than just a generic red "(error)" message.

This issue is related to issue 569 (#569) and can be found all over StackOverflow with people that have come across similar issues. It is my opinion that these errors need to be more accurate, for both the user and the programmer, and I'm not the only one that's been frustrated with these "unhelpful" errors:
https://stackoverflow.com/questions/17051845/ajaxfileupload-error
https://stackoverflow.com/questions/24467587/ajaxfileupload-error-and-uploadcomplete-wont-fire
https://stackoverflow.com/questions/21559151/unknown-error-when-uploading-file-with-ajaxfileupload
https://stackoverflow.com/questions/62445707/asp-net-ajax-ajaxfileupload-uncaught-error-raising-upload-complete-event-and-st

Browser(s) used

Chrome

A site deployment method

Both:

  • VS development web-server,
  • IIS
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant