WCF MexTCP issue -There is already a listener on IP endpoint 0.0.0.0:portnumber

21 Feb

If 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.

Advertisement

Leave a Reply

Please log in using one of these methods to post your comment:

Gravatar
WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.