none
There was no endpoint listening at ... error RRS feed

  • Question

  • Hello

    I am starting WCF and I have created a small sample with the following strucutre :

    A WCF service, a console app acting as host to the service and a client console app.

    When I run the example locally it works but when I move the host to another machine I get the error 

    "There was no endpoint listening at https://xxxxx:8080/WCF_1 that could accept the message. This is often caused by an incorrect address or SOAP action"

    The internal exception error is 10061 and the message 

    "No connection could be made because the target machine actively refused it 192.168.56.1:8080"

    The service host machine is Win7 and the client is XP.

    What am I missing?

    Yannis

    Yannis Makarounis

    Tuesday, January 22, 2013 5:38 PM

Answers

  • Yes.  You can try the webbrowser with both the IP address and machine name from the client.  It is interesting that the machine name dellym64 worked.  Normally when there are problems the IP address will work but the machine name doesn't work.

    When the machine name works it normally means the DNS is being used to resolve the host name.  When you tried PING did you use the IP address or the machine name?  It should work with both the IP address and machine name.

    when I see problems like this it is usually due to somebody change the IP address or machine name of a PC and forgetting to reboot the PC.  What is happening here is not normal when you can get a connection with an IE browser and not get it to work with software.  I'm still suspecting the end point in the client is using the wrong interface.  Does the client have more than network card?  Is the ethernet cable in the client connected to the correct card?


    jdweng

    Wednesday, January 23, 2013 4:59 PM

All replies

  • Try a port number greater than 10,000.  Port number 8080 is often blocked by firewalls and virus checkers.  Also make sure the client isn't using the loopback address 127.0.0.1 as the local endpoint.  The client must use a real IP address like 192.168.59.1 as the source IP address.  The "actively refuse" message often occurs when the source IP address is set to 127.0.0.1.

    jdweng

    Tuesday, January 22, 2013 6:00 PM
  • Please host your WCF service in IIS and specify the endpoint address like the following one.

     <endpoint 
            name="Receptor"
            address="http://MyServer:8000/WS.svc"
            binding="wsHttpBinding"
            contract="IMyContract"
        />


    With Thanks and Regards
    Sambath Raj.C
    click "Proposed As Answer by" if this post solves your problem or "Vote As Helpful" if a post has been useful to you
    Happy Programming!

    Tuesday, January 22, 2013 7:24 PM
  • Actually I want my WCF service to finally be hosted in a Windows service not in IIS.

    I have just build an example using two console applications to get an idea on how the whole system works.

    Thank you

    Yannis


    Yannis Makarounis

    Wednesday, January 23, 2013 7:15 AM
  • I tried 10001 and I got the error

    "Could not connect to net.tcp://dellym64:10001/WCF_1. The connection attempt lasted for a time span of 00:00:22.0312500. TCP error code 10061: No connection could be made because the target machine actively refused it 192.168.56.1:10001. "

    ErrorCode = 10061

    SocketErrorCode=System.Net.Sockets.SocketError.ConnectionRefused

    Any ideas?

    Yannis


    Yannis Makarounis

    Wednesday, January 23, 2013 12:09 PM
  • Use the command below to check that status of the port on both the server and client.  The server may not have the port in the listening mode.  You could also have the issue if there isn't a route between the two computers.  Try using PING on Both the client and server to see if you get a response.  sometimes you get a Ping response from the client to the server, but don't get it from the server to the client.

    Netstat -a


    jdweng

    Wednesday, January 23, 2013 2:04 PM
  • I used ping on both client and server and I got response in both cases.

    I also tried http://dellym64:8080/wcf_1?wsdl in the browser and got back an xml with the service's details. That to me means that there is access to the service. Correct?



    Yannis Makarounis

    Wednesday, January 23, 2013 4:12 PM
  • Yes.  You can try the webbrowser with both the IP address and machine name from the client.  It is interesting that the machine name dellym64 worked.  Normally when there are problems the IP address will work but the machine name doesn't work.

    When the machine name works it normally means the DNS is being used to resolve the host name.  When you tried PING did you use the IP address or the machine name?  It should work with both the IP address and machine name.

    when I see problems like this it is usually due to somebody change the IP address or machine name of a PC and forgetting to reboot the PC.  What is happening here is not normal when you can get a connection with an IE browser and not get it to work with software.  I'm still suspecting the end point in the client is using the wrong interface.  Does the client have more than network card?  Is the ethernet cable in the client connected to the correct card?


    jdweng

    Wednesday, January 23, 2013 4:59 PM
  • Ping works with both IP and machine names.

    The only difference is that one machine is connected through a wireless connection and the other through cable. At each machine I have created a "shared" folder and both are accessible from the other.


    Yannis Makarounis

    Wednesday, January 23, 2013 5:35 PM
  • I sounds like a firewall is blocking the port number.

    jdweng

    Wednesday, January 23, 2013 6:00 PM