title: Client is trying to connect to invalid address on Service Fabric ServiceProxy
body: <p>I have an Asp.net Core 2.0 stateless Service and an Asp.net Core 2.0 stateful service on Service Fabric 6 with 10 partition count.</p>
  
  <p>I followed this tutorial</p>
  
  <p><a href="https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-add-a-web-frontend" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-add-a-web-frontend</a></p>
  
  <p>I followed all steps except that I used the templates in Visual Studio where 
  CreateServiceReplicaListeners is using KestrelCommunicationListener</p>
  
  <pre><code> protected override IEnumerable&lt;ServiceReplicaListener&gt; CreateServiceReplicaListeners()
      {
          return new ServiceReplicaListener[]
          {
              new ServiceReplicaListener(serviceContext =&gt;
                  new KestrelCommunicationListener(serviceContext, (url, listener) =&gt;
                  {
                      return new WebHostBuilder()
                                  .UseKestrel()
                                  .ConfigureServices(
                                      services =&gt; services
                                          .AddSingleton&lt;StatefulServiceContext&gt;(serviceContext)
                                           .AddSingleton&lt;IReliableStateManager&gt;(this.StateManager))
                                  .UseContentRoot(Directory.GetCurrentDirectory())
                                  .UseStartup&lt;Startup&gt;()
                                  .UseServiceFabricIntegration(listener, ServiceFabricIntegrationOptions.UseUniqueServiceUrl)
                                  .UseUrls(url)
                                  .Build();
                  }))
          };
      }
  </code></pre>
  
  <p>When I call my service in the Asp.net Core 2.0 Stateless service using this code:</p>
  
  <pre><code>var service = ServiceProxy.Create&lt;IStorageService&gt;(new Uri("fabric:/MyCluster/Storage"), new ServicePartitionKey(Fnv1aHashCode.Get64bitHashCode(User.Id)));
  await service.MyMethod();
  </code></pre>
  
  <p>An Exception is raised when calling "MyMethod"</p>
  
  <p><strong>Client is trying to connect to invalid address <a href="http://localhost:58352/etc" rel="nofollow noreferrer">http://localhost:58352/etc</a>..</strong> </p>
  
  <p>The url present in the exception is present in the Service Fabric Explorer, and the Port and PartitionKey is correct.
  No Endpoints are set in the ServiceManifest, since the Stateful service is basically just the template with the addition of an IService Interface and the MyMethod method as per tutorial above.</p>
  
  <p>What I'm missing here? 
  The documentation is not up to date for Asp.net Core 2.0.</p>
  
  <p>I tried to not use partitions, setting  <code>ServicePartitionKey(0)</code> but same result.</p>
  
  <p>I don't know how to proceed.</p>