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>