title: Call WCF service from ASP.NET core 3.1 API
body: <p>I am getting below error when I am trying to call WCF service from ASP.Net Core, this is happening only when both wcf service and API deployed on IIS 10.</p>
  <blockquote>
  <p>Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker
  invoker, Task lastTask, State next, Scope scope, Object state, Boolean
  isCompleted) System.ServiceModel.CommunicationException: No connection
  could be made because the target machine actively refused it.
  ---&gt; System.Net.Http.HttpRequestException: <strong>No connection could be made because the target machine actively refused it.</strong>
  ---&gt; System.Net.Sockets.SocketException (10061): No connection could be made because the target machine actively refused it. at
  <strong>System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)</strong></p>
  </blockquote>
  <p>I am able to connect same WCF service from ASP.NET MVC controller. It fails only when we access from .net core.</p>
  <p>Any thoughts here, will be greatly appreciated.</p>
  <p>Thanks,
  Pani</p>