Completed
Last Updated: 13 Aug 2026 12:11 by ADMIN
Release 2026 Q3
Daniel
Created on: 09 Jul 2026 14:57
Category: AsyncUpload
Type: Bug Report
0
e.UploadResult in the FileUploadEvent throws InvalidOperationException "This type is not allowed"
Accessing the e.UploadResult from the FileUploadedEvent while using custom handlers throws InvalidOperationException "This type is not allowed"
3 comments
ADMIN
Attila Antal
Posted on: 13 Aug 2026 12:11

Hi Hongmei,

The issue we fixed was a bug in the code. After that if you're still getting the "Type is not allowed" exception, that is likely due to the missing key in the web.config, see AllowedCustomMetaDataTypes.

I have tested locally with a custom handler similar to yours and it throws the error, however, adding the following to the web.config fixes that:

<appSettings>
	<add key="Telerik.Upload.AllowedCustomMetaDataTypes" value="CustomAsyncUploadResult" />
</appSettings>

Please ensure that all Custom Types you implement for the AsyncUpload, is also listed in the AllowedCustomMetaDataTypes Web config setting.

Regards,
Attila Antal
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources
Hongmei
Posted on: 13 Aug 2026 09:21
I am currently using the latest version 2026_3_812_hotfix. The error is still there.

Here is the control:

	

<telerik:RadAsyncUploadRenderMode="Lightweight"runat="server"ID="UploadFile"HttpHandlerUrl="~/Handlers/FileUploadHandler.ashx"ChunkSize="1048576"/>

Here is the handler:

PublicClassFileUploadHandlerInheritsAsyncUploadHandlerImplements System.Web.SessionState.IRequiresSessionStateProtectedOverridesFunctionProcess(ByValfileAsUploadedFile, ByValcontextAsHttpContext, ByValconfigurationAsIAsyncUploadConfiguration, ByValtempFileNameAsString) AsIAsyncUploadResultDimresultAsCustomAsyncUploadResult = CreateDefaultUploadResult(OfCustomAsyncUploadResult)(file) result.CustomSize = file.ContentLength ReturnresultEndFunctionEndClass

Here is the error:

	Private Sub UploadFile_FileUploaded(sender As Object, e As FileUploadedEventArgs) Handles UploadFile.FileUploaded
		Dim result As CustomAsyncUploadResult = TryCast(e.UploadResult, CustomAsyncUploadResult)
	End Sub
ADMIN
Attila Antal
Posted on: 10 Jul 2026 08:07

Hi Daniel,

Thanks again for reaching out and flagging the regression. The level of detail you included made it much easier for us to track down the root cause.

I’m happy to let you know that the issues have been resolved. The fixes are scheduled to go out with our upcoming 2026 Q3 release.

We appreciate your help in keeping things running smoothly.

Regards,
Attila Antal
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources