此平台不支持Apache Ignite .NET序列化委托

ale*_*eha 0 .net-core ignite

这里提出关于安排工作的问题.

通过简单的文本输出到控制台测试它,并通过HttpClient通过简单的异步Web请求进行测试.工作良好.

实现了具有大量长时间运行任务和并行计算的实际业务逻辑.

Ignite .NET版本:2.3.0

应用平台:dotnet core 2.0

但是在服务注册时收到例外DeployClusterSingleton.

System.Runtime.Serialization.SerializationException:此平台不支持"序列化委托".

来源:System.Private.CoreLib

   at System.MulticastDelegate.GetObjectData(SerializationInfo info, StreamingContext context)
   at Apache.Ignite.Core.Impl.Binary.SerializableSerializer.WriteBinary[T](T obj, BinaryWriter writer)
   at Apache.Ignite.Core.Impl.Binary.BinaryWriter.Write[T](T obj)
   at Apache.Ignite.Core.Impl.Binary.BinaryReflectiveSerializerInternal.Apache.Ignite.Core.Impl.Binary.IBinarySerializerInternal.WriteBinary[T](T obj, BinaryWriter writer)
   at Apache.Ignite.Core.Impl.Binary.BinaryWriter.Write[T](T obj)
   at Apache.Ignite.Core.Impl.Binary.BinaryUtils.WriteArray(Array val, BinaryWriter ctx, Nullable`1 elemTypeId)
   at Apache.Ignite.Core.Impl.Binary.BinarySystemHandlers.WriteArray(BinaryWriter ctx, Object obj)
   at Apache.Ignite.Core.Impl.Binary.BinaryWriter.Write[T](T obj)
   at Apache.Ignite.Core.Impl.Binary.BinaryReflectiveSerializerInternal.Apache.Ignite.Core.Impl.Binary.IBinarySerializerInternal.WriteBinary[T](T obj, BinaryWriter writer)
   at Apache.Ignite.Core.Impl.Binary.BinaryWriter.Write[T](T obj)
   at Apache.Ignite.Core.Impl.Binary.BinaryReflectiveSerializerInternal.Apache.Ignite.Core.Impl.Binary.IBinarySerializerInternal.WriteBinary[T](T obj, BinaryWriter writer)
   at Apache.Ignite.Core.Impl.Binary.BinaryWriter.Write[T](T obj)
   at Apache.Ignite.Core.Impl.Binary.BinaryReflectiveSerializerInternal.Apache.Ignite.Core.Impl.Binary.IBinarySerializerInternal.WriteBinary[T](T obj, BinaryWriter writer)
   at Apache.Ignite.Core.Impl.Binary.BinaryWriter.Write[T](T obj)
   at Apache.Ignite.Core.Impl.Binary.BinaryReflectiveSerializerInternal.Apache.Ignite.Core.Impl.Binary.IBinarySerializerInternal.WriteBinary[T](T obj, BinaryWriter writer)
   at Apache.Ignite.Core.Impl.Binary.BinaryWriter.Write[T](T obj)
   at Apache.Ignite.Core.Impl.Services.Services.<>c__DisplayClass3.<DeployMultiple>b__2(BinaryWriter w)
   at Apache.Ignite.Core.Impl.PlatformTargetAdapter.WriteToStream(Action`1 action, IBinaryStream stream, Marshaller marsh)
   at Apache.Ignite.Core.Impl.PlatformJniTarget.InStreamOutStream[TR](Int32 type, Action`1 writeAction, Func`2 readAction)
   at Apache.Ignite.Core.Impl.Services.Services.DeployMultiple(String name, IService service, Int32 totalCount, Int32 maxPerNodeCount)
   at Apache.Ignite.Core.Impl.Services.Services.DeployClusterSingleton(String name, IService service)
Run Code Online (Sandbox Code Playgroud)

很难猜到,导致这个问题的代码部分.我所要做的就是逐个部分替换代码.

如果需要更多细节,我可以提供更多信息.

经过调查:

是的IOptions<>,ILogger<>

下一个是:System.PlatformNotSupportedException: 'Operation is not supported on this platform.'来自System.Reflection.RuntimePropertyInfo.GetObjectData(SerializationInfo info, StreamingContext context)

另一个是: Apache.Ignite.Core.Binary.BinaryObjectException: 'Conflicting field IDs [type=HttpClient, field1=_disposed, field2=_disposed, fieldId=375705476]'

遗憾的是,由于这个原因,我不得不改变架构;

Pav*_*syn 5

此异常是由.NET Core引起的,它不支持委托序列化.Ignite只调用标准的GetObjectData方法.

这可以在正常的.NET 4+下运行.

您的服务类是否包含任何代理?