WCF MexTCP issue -There is already a listener on IP endpoint 0.0.0.0:portnumber
21 02 2008If you happen to use mex endpoint together with other endpoints in a configuration file for your service, AND if you get error “There is already a listener on IP endpoint”, just remove the port number for the mex end point or if you want you can add the “portSharingEnabled” property in the binding configuration.
portSharingEnabled=”true”
Don’t use
Instead use
You still can WSDL Even if you don’t have port number
The error looks like this:
Service cannot be started. System.ServiceModel.AddressAlreadyInUseException: There is already a listener on IP endpoint 0.0.0.0:8081. Make sure that you are not trying to use this endpoint multiple times in your application and that there are no other applications listening on this endpoint. —> System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at System.ServiceModel.Channels.SocketConnectionListener.Listen()
— End of inner exception stack trace —
at System.ServiceModel.Channels.SocketConnectionListener.Listen()
at System.ServiceModel.Channels.BufferedConnectionListener.Listen()
at System.ServiceModel.Channels.ExclusiveTcpTransportManager.OnOpen()
at System.ServiceModel.Channels.TransportManager.Open(TransportChannelListener channelListener)
at System.ServiceModel.Channels….
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.



