问题
I'm am trying to connect to a Service Fabric application using the ServiceProxy
class like so:
return ServiceProxy.Create<ISomeService>(
new Uri("fabric:/SomeService.App/ISomeService"),
new ServicePartitionKey(0));
When I do this from a .Net Framework application everything works fine.
However, when I try this from a .Net Core application I get the following error:
InnerException = {System.Fabric.FabricInvalidAddressException: NamedEndpoint 'V2Listener' not found in the address '{"Endpoints":{"":"..."}}' for partition '...')
I'm assuming this has something to do with V2 remoting, but I can't figure out what exactly it is in the .Net Core project that is defaulting it to use V2 instead of V1.
Is there a way I can force it to use V1 - I'm not in a position to upgrade the target service to V2 at the moment.
All applications involved are using Service Fabric version 6.1.480
Only relevant documentation I can find is Service Fabric Reliable Services Communication Remoting and it hasn't helped me find a solution.
回答1:
You can only use SF Remoting V2 in .Net Core. Remoting V1 is supported using Full Framework only. (I agree that the documentation should specify this.)
See this link
来源:https://stackoverflow.com/questions/50756171/fabricinvalidaddressexception-namedendpoint-v2listener-when-trying-to-connect