Closed JDA88 closed 7 months ago
@JDA88 , there is a known issue for using .Net SDK with .Net 8. The BinaryFormatter which is used in HPC Pack client & server has been disabled in .Net 8. Please refer to this doc. The workaround is to add the following in your project file to build with the SDK.
<PropertyGroup>
...
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
</PropertyGroup>
Setting the value to true
fixed the issue, thank you very much for that, I didn’t know BinaryFormatter
was used for communication.
I suppose the fact that it worked on a WinForms SDK project imply that those set it to true implicitly.
Is there a way to have a better error message or a more way to detect the fact that BinaryFormatter
is not enabled at compile time? Because having a SDK compatible with .NET8+ means lots of people will use the SDK format and face the issue.
Looking at the roadmap if I understand correctly the BinaryFormatter
is supposed to be removed completely from .NET9, hare you planning to have an alternative?
@JDA88 , that's right, we shall move away from BinaryFormatter which keeping the back-compatibility for old clients & servers.
Problem Description
We are currently using the HPC Pack 2016 SDK to connect to multiple HPC Pack 2016 cluster.
I am trying to convert it to use the HPC Pack .Net SDK in .NET8. In Winform i have no issue, it work flawlessly. But from a Minimal API WebService, no matter the method used to connect to the cluster I get the following exception :
Microsoft.Hpc.Scheduler.Properties.SchedulerException: "Could not register with the server. Try again later."
Is there anything special I have to do to be able to connect to an HPC cluster from a Minimal API WebService?
Steps to Reproduce
Additonal Comments
Using the
HPC Pack .Net SDK (6.3.8022-beta)