We are migrating to .net core 5 web project, and we started to receive the following exception whenever we try to access the scaleout cache
The only solution I can find out is to enable Binary formatter again by putting these lines in the web project file
Which is not recommended as per the warning, is there any other safer way to do that?
Code:
BinaryFormatter serialization and deserialization are disabled within this application. See https://aka.ms/binaryformatter for more information.
XML:
<!-- Warning: Setting the following switch is *NOT* recommended in web apps. -->
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>