none
Unable to connect to remote server error in iis express RRS feed

  • Question

  • Hi,

    I have console application that call some API that is working fine 

    https://www.xxxxxxco.il/QA/xxxServiceFront/xxxx.asmx

    but when i tying to call this API from a WCF Service on IIS EXpress or On IIS in  server 2012  i am getting this error:

    Unable to connect to remote server 

    There was no endpoint listening at https://www.xxxxxxco.il/QA/xxxServiceFront/xxxx.asmx that could accept the message. This is often caused by an incorrect address or SOAP action. 

    why there a difference between IIS express and the console application?

    Wednesday, May 30, 2018 1:06 PM

All replies

  • Most probably your configuration files, when you configure your endpoints not by code.

    Wednesday, May 30, 2018 1:13 PM
  • why there a difference between IIS express and the console application?

    IIS Express is for Web development with a development machine that is not using the real IIS Web server that is local on the machine.

    A console application is a desktop program and it's not a Web server, not even the limited IIS Express development Web server.

    It looks like you may have firewall issues that is blocking inbound port.

    Wednesday, May 30, 2018 10:54 PM
  • Hi,

    on the local pc firewall i enabled the iis express port in the inbound and outbound rules and its still not working.

    this is the code that is working fine in console application, but on WCF service its getting the communication error:

    BDISR.XmlBDIOnLineSoapClient _proxy = new BDISR.XmlBDIOnLineSoapClient();
    EndpointAddress endPointAddress = new EndpointAddress("https://www.xxxxxx/QA/xxxx.asmx");

    BasicHttpBinding binding = bindingHelper.GetBinding();
    binding.Security.Mode = BasicHttpSecurityMode.Transport;
    binding.Security.Transport.Realm = "";
    binding.Security.Transport.ProxyCredentialType = HttpProxyCredentialType.None;
    binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Basic;
    binding.Security.Message.ClientCredentialType = BasicHttpMessageCredentialType.UserName;
    binding.Security.Message.AlgorithmSuite = System.ServiceModel.Security.SecurityAlgorithmSuite.Default;

    _proxy.Endpoint.Address = endPointAddress;
    _proxy.Endpoint.Binding = binding;
    _proxy.ClientCredentials.UserName.UserName = "xxx";
    _proxy.ClientCredentials.UserName.Password = "xxx";

    WebRequest.DefaultWebProxy.Credentials = CredentialCache.DefaultNetworkCredentials;

    BDISR.DoBusinessProcessRequest bdiReq = new BDISR.DoBusinessProcessRequest();
    bdiReq.Body = new BDISR.DoBusinessProcessRequestBody();

    XElement xElementReq = ... some object
    bdiReq.Body.req = xElementReq;

    BDISR.DoBusinessProcessResponse res = _proxy.DoBusinessProcess(bdiReq);

    Thursday, May 31, 2018 6:23 AM
  • BDISR.XmlBDIOnLineSoapClient _proxy = new BDISR.XmlBDIOnLineSoapClient();
    EndpointAddress endPointAddress = new EndpointAddress("https://www.xxxxxx/QA/xxxx.asmx");

    An ASMX, legacy Web service, is not a WCF Web service. So, I don't know what you are doing there. It doesn't seem valid as an endpoint. 


    Thursday, May 31, 2018 11:03 AM
  • this code is in inside WCF service that i am trying to use and its gets the communication error in the row:

    BDISR.DoBusinessProcessResponse res = _proxy.DoBusinessProcess(bdiReq);

    the same code works fine in a console application project, it seems that when it runs on IIS 

    there is a communication problem accessing this link:

    https://www.xxxxxx/QA/xxxx.asmx


    Sunday, June 3, 2018 5:18 AM
  • Running something under IIS Express to connect or communicate  with an external source like a Web site is not viable. IIS Express is not a real Web server, it's fake. Local IIS on the workstation should be used, which is the real Web server.

    You can deploy the Web project out to local IIS via Visual Stuido and run the project through Visual Stuido and watch code execution and debug on local IIS, just like you can with IIS Express. 

    http://codetunnel.io/how-to-debug-your-aspnet-projects-running-under-iis/

    Then you attach to the wpw3.exe that services the App Pool that is hosting the Web project if you want to debug it.

    https://www.codeproject.com/Articles/37182/Debug-your-ASP-NET-Application-while-Hosted-on-IIS

    Sunday, June 3, 2018 8:27 AM