Kendo upload error "An asynchronous module or handler completed while an asynchronous operation was still pending."

1 Answer 463 Views
Upload
xion
Top achievements
Rank 1
xion asked on 15 Jun 2022, 05:19 AM

Hi..

When I upload file using kendo upload, it will hit the error event with response message "An asynchronous module or handler completed while an asynchronous operation was still pending.", but the file is successfully uploaded.

This only happen on the first time, subsequently is not getting the error anymore.


$("#files").kendoUpload({
	async: {
		saveUrl: "upload.aspx",
		removeUrl: "remove",
		autoUpload: true,
		allowmultiple: true,
		batch: true
	},
	localization: {
		select: "Select Files"
	},
	complete: onComplete,                
	error: function (e) {
		console.log(e);
	},
	select: function (e) {
		
	},
	dropZone: "#dropZoneElement",
	showFileList: false
});
Any idea of what is going on?

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 17 Jun 2022, 09:14 AM

Hello, 

The Upload configuration looks in order to me. Probably the issue is on the server method you are using for saveUrl. I am sharing two links that discuss the same error, I hope they will be helpful.

https://stackoverflow.com/questions/28805796/asp-net-controller-an-asynchronous-module-or-handler-completed-while-an-asynchr

https://social.msdn.microsoft.com/Forums/en-US/864bb0c6-7eee-4891-8a82-d699c79b604a/an-asynchronous-module-or-handler-completed-while-an-asynchronous-operation-was-still-pending?forum=aspwebforms

Regards,
Martin
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

xion
Top achievements
Rank 1
commented on 20 Jun 2022, 02:48 AM

Hi..I have check the server method and is a very straight forward function that saving the uploaded file to a temporary folder.


private void uploadfile(){
   //there is no async/await/Task in this function
   for (int i = 0; i < Request.Files.Count; i++)
   {
        HttpPostedFile postedFile = Request.Files[i];
        postedFile.SaveAs(temp);
   }
}
Martin
Telerik team
commented on 22 Jun 2022, 12:42 PM

Could you please trying with a server implementation similar to the one shown on our demos?
Tags
Upload
Asked by
xion
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or