我有一个关于在SF Service中引发异常的问题–我对反序列化放置在同一群集中(但来自其他解决方案的其他服务类型)的其他远程服务上的异常有问题。我尝试抛出自定义异常,并且反序列化遇到问题,并切换为使用来自原始异常的消息抛出简单的Exception类型,但是在客户端从源服务中查找库仍然失败。我不知道为什么在引发简单异常时远程服务会在寻找这个库。在没有异常的情况下,调用远程服务可以正常工作。
我正在通过此链接https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-reliable-services-communication-remoting使用解决方案
IMyService helloWorldClient = ServiceProxy.Create<IMyService>(new Uri("fabric:/MyApplication/MyHelloWorldService"));
string message = await helloWorldClient.Test("", "", DateTime.Now);
public interface IMyService : IService
{
Task Test(string arg, string arg2, DateTime date);
}
我得到这个:
Failed to deserialize and get remote exception System.IO.FileNotFoundException: Could not load file or assembly 'XXX.ServiceFabricCommon, Version=6.60.3.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. File name: 'XXX.ServiceFabricCommon, Version=6.60.3.0, Culture=neutral, PublicKeyToken=null' at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)…