Search code examples
azure-service-fabric

Azure Service Fabric ASP .net with remoting listener


I have a service externally exposed via HTTPS which I also want to use internal to my cluster via service remoting. I know I can setup the listener in the CreateServiceListeners method, but the problem I have is that I will need to implement the interface from that same StatelessService class which doesn't work as the method is implemented in the Controller. Is this possible and if so, is there an example I can look at?


Solution

  • I would recommend this:

    • Move the implementation logic to a separate class.
    • Use Dependency Injection to pass that class to your service and controller.