Service Fabric Stateful Service Remoting V2

后端 未结 1 1867
庸人自扰
庸人自扰 2021-02-08 10:10

I have a Stateful Service called by a Stateless service, in .Net Standard Asp.net Core 2.0 running on Visual Studio 15.4. I can\'t make the Service Remoting V2 work.

The

1条回答
  •  说谎
    说谎 (楼主)
    2021-02-08 10:15

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

    protected override IEnumerable 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:

    And rebuild the client.

    0 讨论(0)
提交回复
热议问题