Search code examples
azurevisual-studio-2015portmicroservicesazure-service-fabric

How to make two microservices listen on same port in azure service fabric


I have created a project with two microservices and want both of them to listen to same port. I have two separate ServiceManifest File in which i have defined same endpoint for both of them but when i deploy it locally or remotely it doesn't work.

When I deploy it locally it shows following Exception: Exception thrown: 'System.Reflection.TargetInvocationException' in mscorlib.dll


Solution

  • Keep the "port number same in ServiceManifest.xml file for both the Microservices."

    Just make the URL different for different services

    For Ex localhost:8100/service1/....
    localhost:8100/service2/....

    "Different appRoot for different services"