Service Fabric V2 remoting Custom Headers

569 views Asked by At

I am using Service Fabric with .net core with Service Fabric Remoting V2. and I am building a multi-tenant app and I want to add custom header to send the tenant ID automatically.

I have started with the solution for this question which uses normal .net framework with service fabric but in the case of .net core it didn't even compile since the service fabric with .net core has different APIs and Methods.

The code goes as follows and There are many cases for non existing APIs:

The Client

  1. ProxyFactory

var _proxyFactory = new ServiceProxyFactory(c => new ServiceRemotingClientFactoryWrapper(new WcfServiceRemotingClientFactory(callbackClient: c)));

The bold class comes from the Microsoft.ServiceFabric.Services.Wcf package (aside whats said in the nuget site) it is asking me to add a System.ServiceModel Dll which is a full .net library and not even in the stated dependencies.

  1. The ServiceRemotingClientWrapper provided in the solution contains a class named ServiceRemotingMessageHeaders which according to documentation is the in the service remoting class but it doesn't exist. Also the functions in the interface take IServiceRemotingRequestMessage which is different from the aforementioned demo.

The Server

the class ServiceRemotingDispatcher should be in the remoting Dll and yet it doesn't exit.

Finally, This project uses the same methodology to implement my goal and its based on the same SOF question but uses full .net framework and it works. Link to project

0

There are 0 answers