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.
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.
—> System.Net.Http.HttpRequestException: No connection could be made because the target machine actively refused it.
—> System.Net.Sockets.SocketException (10061): No connection could be made because the target machine actively refused it.
at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
I am able to connect same WCF service from ASP.NET MVC controller. It fails only when we access from .net core.
Any thoughts here, will be greatly apricated.
Go to Source