// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) { var handler = new GatewayHttpClientHandler(new Uri("fabric:/Hosting/CounterService"), message => message.GetHashCode()); var proxyOptions = new ProxyOptions() { Host = "unused", BackChannelMessageHandler = handler }; app.RunProxy(proxyOptions); }