What do the EndPoints configure in the ServiceManifest of an Service Fabric Service?
<p>We have a Service Fabric Service project with multiple services: Actors, Stateful services and Stateless services combined into one ServiceManifest.</p>

<p>Two stateful services did not work: the constructors were called, the communicationlisteners (through remoting) were created, but the RunAsync method was <strong>not</strong> called.</p>

<p>After removing the endpoint listing from the ServiceManifest.xml the services started working again. But now we are left wondering why and how this works. Could someone explain?</p>

<p>To illustrate, the relevant section was</p>

<pre><code>  &lt;Resources&gt;
    &lt;Endpoints&gt;
      &lt;Endpoint Name="WebServiceEndpoint" Type="Input" Protocol="http" Port="80" /&gt;
      &lt;Endpoint Name="StatelessServiceEndpoint1" Type="Input" Protocol="http" Port="10101" /&gt;
      &lt;Endpoint Name="ActorServiceEndpoint1" /&gt;
      &lt;Endpoint Name="ActorServiceReplicatorEndpoint1" /&gt;
      &lt;Endpoint Name="ActorServiceEndpoint2" /&gt;
      &lt;Endpoint Name="ActorServiceReplicatorEndpoint2" /&gt;
      &lt;Endpoint Name="ActorServiceEndpoint3" /&gt;
      &lt;Endpoint Name="ActorServiceReplicatorEndpoint3" /&gt;
      &lt;Endpoint Name="ActorServiceEndpoint4" /&gt;
      &lt;Endpoint Name="ActorServiceReplicatorEndpoint4" /&gt;
      &lt;Endpoint Name="StatefulServiceEndpoint1" Type="Input" Protocol="http" /&gt;
      &lt;Endpoint Name="StatefulServiceReplicatorEndpoint1" /&gt;
      &lt;Endpoint Name="StatefulServiceEndpoint2" Type="Input" Protocol="http" /&gt;
      &lt;Endpoint Name="StatefulServiceReplicatorEndpoint2" /&gt;
      &lt;Endpoint Name="StatelessServiceEndPoint2" Type="Input" Protocol="http" /&gt;
    &lt;/Endpoints&gt;
  &lt;/Resources&gt;
</code></pre>

<p>After changing it to this</p>

<pre><code>  &lt;Resources&gt;
    &lt;Endpoints&gt;
      &lt;Endpoint Name="WebServiceEndpoint" Type="Input" Protocol="http" Port="80" /&gt;
      &lt;Endpoint Name="StatelessServiceEndpoint1" Protocol="http" /&gt;
      &lt;Endpoint Name="ActorServiceReplicatorEndpoint1" /&gt;
      &lt;Endpoint Name="ActorServiceReplicatorEndpoint2" /&gt;
      &lt;Endpoint Name="ActorServiceReplicatorEndpoint3" /&gt;
      &lt;Endpoint Name="ActorServiceReplicatorEndpoint4" /&gt;
      &lt;Endpoint Name="StatefulServiceReplicatorEndpoint1" /&gt;
      &lt;Endpoint Name="StatefulServiceReplicatorEndpoint2" /&gt;
    &lt;/Endpoints&gt;
  &lt;/Resources&gt;
</code></pre>

<p>everything worked. But why?</p>

<p><strong>EDIT</strong>
The complete ServiceManifest is this:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;ServiceManifest Name="Service" Version="1.0.0"
                 xmlns="http://schemas.microsoft.com/2011/01/fabric"
                 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
  &lt;ServiceTypes&gt;
    &lt;StatefulServiceType ServiceTypeName="ActorService1Type" /&gt;
    &lt;StatefulServiceType ServiceTypeName="ActorService1Type" HasPersistedState="true" /&gt;
    &lt;StatefulServiceType ServiceTypeName="ActorService3Type" /&gt;
    &lt;StatefulServiceType ServiceTypeName="ActorService4Type" HasPersistedState="true" /&gt;
    &lt;StatefulServiceType ServiceTypeName="StatefulService1Type" HasPersistedState="true" /&gt;
    &lt;StatefulServiceType ServiceTypeName="StatefulService2Type" HasPersistedState="true" /&gt;
    &lt;StatelessServiceType ServiceTypeName="StatelessService1Type" /&gt;
    &lt;StatelessServiceType ServiceTypeName="StatelessService2Type" /&gt;
    &lt;StatelessServiceType ServiceTypeName="WebServiceType" /&gt;
  &lt;/ServiceTypes&gt;
  &lt;CodePackage Name="Code" Version="1.0.0"&gt;
    &lt;SetupEntryPoint&gt;
      &lt;ExeHost&gt;
        &lt;Program&gt;Setup.exe&lt;/Program&gt;
      &lt;/ExeHost&gt;
    &lt;/SetupEntryPoint&gt;
    &lt;EntryPoint&gt;
      &lt;ExeHost&gt;
        &lt;Program&gt;Service.exe&lt;/Program&gt;
      &lt;/ExeHost&gt;
    &lt;/EntryPoint&gt;
  &lt;/CodePackage&gt;
  &lt;ConfigPackage Name="Config" Version="1.0.0" /&gt;
  &lt;Resources&gt;
    &lt;Endpoints&gt;
      &lt;Endpoint Name="WebServiceEndpoint" Type="Input" Protocol="http" Port="80" /&gt;
      &lt;Endpoint Name="StatelessServiceEndpoint1" Protocol="http" /&gt;
      &lt;Endpoint Name="ActorServiceReplicatorEndpoint1" /&gt;
      &lt;Endpoint Name="ActorServiceReplicatorEndpoint2" /&gt;
      &lt;Endpoint Name="ActorServiceReplicatorEndpoint3" /&gt;
      &lt;Endpoint Name="ActorServiceReplicatorEndpoint4" /&gt;
      &lt;Endpoint Name="StatefulServiceReplicatorEndpoint1" /&gt;
      &lt;Endpoint Name="StatefulServiceReplicatorEndpoint2" /&gt;
    &lt;/Endpoints&gt;
  &lt;/Resources&gt;
&lt;/ServiceManifest&gt;
</code></pre>