Skip to content

Latest commit

 

History

History
54 lines (42 loc) · 1.69 KB

binaryformatter-exception-after-upgrade-to-net5.md

File metadata and controls

54 lines (42 loc) · 1.69 KB
title description type page_title slug tags ticketid res_type
BinaryFormatter Serialization and Deserialization Are Disabled
The error 'BinaryFormatter serialization and deserialization are disabled' indicates restricted use due to risks from unsafe data handling.
troubleshooting
BinaryFormatter Serialization and Deserialization Are Disabled
binaryformatter-exception-after-upgrade-to-net5
.NET 5.0
1494918
kb

Environment

Product Progress® Telerik® Reporting Up to R3 2020
Target Framework .NET 5.0

Description

The following error might be thrown after upgrading to .NET 5 from .NET Core or Blazor Projects.

Error Message

Error registering the viewer with the service.
An error has occurred.
BinaryFormatter serialization and deserialization are disabled within this application. See https://aka.ms/binaryformatter for more information.

Solution

In the Telerik Reporting R1 2021(15.0.21.120) release, the issue is resolved. If you are using a previous version, we strongly recommend upgrading. If that's not possible, use the suggested workaround below to overcome the error stating "Binaryformatter serialization and deserialization are disabled within this application".

Suggested Workarounds

Add the following lines of code to the csproj file:

<PropertyGroup>
	<TargetFramework>net5.0</TargetFramework>
	<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
</PropertyGroup>