Service Fabric Stateful Service Remoting V2

别等时光非礼了梦想. 提交于 2019-12-03 06:53:30

In your stateful service, in method CreateServiceReplicaListeners, use this code:

protected override IEnumerable<ServiceReplicaListener> CreateServiceReplicaListeners()
{
    return this.CreateServiceRemotingReplicaListeners();
}

And in the file that defines your remoting service interface, add this:

[assembly: FabricTransportServiceRemotingProvider(RemotingListener = RemotingListener.V2Listener, RemotingClient = RemotingClient.V2Client)]

(for example, just below the using namespaces list.)

Add the endpoint: <Endpoint Name="ServiceEndpointV2" />

And rebuild the client.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!