Service Fabric 远程处理异常 -> 从 v1 升级到 v2
Service Fabric Remoting Exception -> upgrade from v1 to v2
我们有一个应用程序已经 运行 在 Service Fabric 上使用带有无状态服务的远程处理一段时间了。升级到 Remoting v2 后,某些方法失败并出现以下错误:
System.InvalidOperationException: 'Type 'System.String[]' cannot be added to list of known types since
another type 'System.Collections.Generic.IEnumerable`1[System.String]' with the same data contract name
'http://schemas.microsoft.com/2003/10/Serialization/Arrays:ArrayOfstring' is already present. If there
are different collections of a particular type - for example, List<Test> and Test[], they cannot both be
added as known types. Consider specifying only one of these types for addition to the known types list.'
at Microsoft.ServiceFabric.Services.Communication.Client.ServicePartitionClient`1.<InvokeWithRetryAsync>d__23`1.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ServiceFabric.Services.Remoting.V2.Client.ServiceRemotingPartitionClient.<InvokeAsync>d__2.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ServiceFabric.Services.Remoting.Builder.ProxyBase.<InvokeAsyncV2>d__21.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
我们有一个应用程序已经 运行 在 Service Fabric 上使用带有无状态服务的远程处理一段时间了。升级到 Remoting v2 后,某些方法失败并出现以下错误:
System.InvalidOperationException: 'Type 'System.String[]' cannot be added to list of known types since
another type 'System.Collections.Generic.IEnumerable`1[System.String]' with the same data contract name
'http://schemas.microsoft.com/2003/10/Serialization/Arrays:ArrayOfstring' is already present. If there
are different collections of a particular type - for example, List<Test> and Test[], they cannot both be
added as known types. Consider specifying only one of these types for addition to the known types list.'
at Microsoft.ServiceFabric.Services.Communication.Client.ServicePartitionClient`1.<InvokeWithRetryAsync>d__23`1.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ServiceFabric.Services.Remoting.V2.Client.ServiceRemotingPartitionClient.<InvokeAsync>d__2.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ServiceFabric.Services.Remoting.Builder.ProxyBase.<InvokeAsyncV2>d__21.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()