The cryptographic operation has failed! error after upgrade to R1 2020 or later

Environment

Product Version 2020.1.114
Product RadAsyncUpload for ASP.NET AJAX

Description

In R1 2020, the custom metadata classes(upload configurations) whitelisting is enabled by default - Whitelist custom metadata types. If your application uses such configurations, you will need to add them to the Telerik.Upload.AllowedCustomMetaDataTypes key in the web.config.

You need to add the fully qualified name of the class, otherwise you will get a The cryptographic operation has failed! error when attempting an upload.

<appSettings>
    <add key="Telerik.Upload.AllowedCustomMetaDataTypes" value="SomeNameSpace.SampleAsyncUploadConfiguration;SomeOtherNameSpace.OtherAsyncUploadConfiguration" />
</appSettings>

Solution

The solution is to add all the custom configuration classes to the Telerik.Upload.AllowedCustomMetaDataTypes key separated by a semicolon ;. To find out the fully qualified names, you can use the following approach that lists the items in a label.

<asp:Label Text="Label1" ID="Label1" runat="server" />
protected void Page_Load(object sender, EventArgs e)
{
    Label1.Text = typeof(MySampleAsyncUploadConfiguration).AssemblyQualifiedName.Split(',')[0];
}

For convenience, you can download the AsyncUploadGetCustomMetaDataTypes sample project implementing the suggested approach from the link below. To make it runnable, place the Telerik.Web.UI.dll assembly in the bin folder of the project.

In the project you will find two pages with two different custom handlers. As you can see, the custom handler that does not have custom configuration, does not need to have anything added to the Telerik.Upload.AllowedCustomMetaDataTypes key.

See Also

In this article
Not finding the help you need? Improve this article