WCF distributed development Common error resolution (11)

Source: Internet
Author: User

WCF distributed development Common error Resolution (one): There is already a listener on IP endpoint, the IP endpoint already exists listeners

In the process of configuring a WCF service endpoint, when you configure the service endpoint port, you will encounter the following error when starting the service program, 1. The error message is as follows:

IP endpoint (port) 0.0.0.0:8002 already has a listener, make sure that one endpoint is not used more than once in a program, or that another program does not listen to this endpoint (port)

There is already a listener on IP endpoint 0.0.0.0:8002. Make sure so you are not trying to use this endpoint multiple the times in your application and that there no other are Ications listening on this endpoint.

2. Reason: This port is already in use, that is, the program is already using a same port. We have to configure two service endpoints to use an endpoint port.

<endpoint address="http://localhost:8002/WCFService" binding="wsHttpBinding" contract="WCFService.IWCFService">
</endpoint>
<endpoint
 address="net.tcp://localhost:8002/WCFService"
 binding="netTcpBinding"  bindingName="netTcpBinding"

 contract="WCFService.IWCFService">
</endpoint>

There will be an error running the service.

3. Solutions:

(1) Check the port of the machine to make sure that it is not a system service port or is not being used by another program.

(2) Check Service endpoint configuration information to ensure that two different service uses different endpoint ports

In this example, the modification code is changed to port 8001:

<endpoint
  address="http://localhost:8001/WCFService"
  binding="wsHttpBinding"
  contract="WCFService.IWCFService">
</endpoint>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.