This looks like a hang, but is actually a loop. It happens due to an exception being thrown when trying to send the message, which makes it retry for ever. The exception is "BinaryFormatter serialization and deserialization are disabled within this application. See https://aka.ms/binaryformatter for more information."
It occurs because BinaryFormatter is so deprecated that, by default, .NET 5 doesn't allow it to be used.
There is a workaround, but it's not recommended, which is to add <EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
to the PropertyGroup element in the application's csproj.
This looks like a hang, but is actually a loop. It happens due to an exception being thrown when trying to send the message, which makes it retry for ever. The exception is
"BinaryFormatter serialization and deserialization are disabled within this application. See https://aka.ms/binaryformatter for more information."
It occurs because BinaryFormatter is so deprecated that, by default, .NET 5 doesn't allow it to be used.
There is a workaround, but it's not recommended, which is to add
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
to the PropertyGroup element in the application's csproj.