none
Does HPC 2019 Pack allow deployed SOA service to write data in runtime data share? RRS feed

  • Question

  • Common Data tutorial has an example where a DataClient is created from a client application and is stored in runtime data share. This common data is then accessed by a deployed service using ServiceContext.GetDataClient method.
    In our application, we wish to add the computational results generated by Service also to be uploaded in runtime data share. However HPCServiceHost.exe is throwing an error while trying to access DataClient class (namespace Microsoft.Hpc.Scheduler.Session.Data)

    Following is the snippet :
    DataClient dclient = DataClient.Create(instanceData.DataServer, instanceData.DataID);
    dclient.WriteAll<T[]>(tobject.ToArray(), true);

    Error :
    Could not load file or assembly 'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

    We have added runtime dependency in app.config of the service class library
    <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <dependentAssembly>
    <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
    </dependentAssembly>
    </assemblyBinding>
    </runtime>

    This code was working perfectly fine for HPC pack 2012 and we are facing this error when we tried to upgrade application to HPC Pack 2019. HPC Pack 2019 documentation has just mentioned about the following change with respect to DataClient class :

    If your service calls ServiceContext.GetDataClient to obtain a reference of DataClient before, no code change is needed.
    Instead if your service explicitly uses DataClient.Open, you'll need to change the call to a new API if your service is running on a non-domain joined node.

    Monday, November 2, 2020 1:16 PM