A TCP error (10013: An attempt was made to access a socket in a way forbidden by its access permissions) occurred while listening on IP Endpoint=0.0.0.0:29999.

If you see the following error, you might have docker or another NAT running on your box.

 

You can check if the 29999 port is being held for NAT with the following command. The result gives ranges on the left/right columns, so look there.

netsh interface ipv4 show excludedportrange protocol=tcp

The result usually looks like this.

Protocol tcp Port Exclusion Ranges

Start Port End Port
———- ——–
9799 9799
50000 50059 *

* – Administered port exclusions.

The solution to get this working is to restart NAT:

net stop winnat
net start winnat

The errors look like this:

15:27:33.557-ERROR : SERVICE : ERROR STARTING SERVICE HOST:
——————————————–
2021-12-06 03:27:33
Please email this file to [email protected]
along with a description of what you were doing
——————————————–
——XPressEntryService v2.9.55.555——
—Calling Functions—————————
-Calling Functions—————————
GetExceptionText
StartServiceHost
Execute
Main

—Exception Message————————–
System.ServiceModel.CommunicationException
A TCP error (10013: An attempt was made to access a socket in a way forbidden by its access permissions) occurred while listening on IP Endpoint=0.0.0.0:29999.
—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.TransportManagerContainer.Open(SelectTransportManagersCallback selectTransportManagerCallback)
at System.ServiceModel.Channels.TransportChannelListener.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.ConnectionOrientedTransportChannelListener.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.TcpChannelListener`2.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open()
at XPressEntryServicesHost.cXPEServiceHost.StartServiceHost(Int32 iSSLPort, String sCertThumbprint) in c:\telaeris\GitHub\XPressEntry-Desktop\XPressEntryService\cXPEServiceHost.vb:line 305
—Begin Inner Exception ——————
——————————————–
2021-12-06 03:27:33
Please email this file to [email protected]
along with a description of what you were doing
——————————————–
——XPressEntryService v2.9.55.555——
—Calling Functions—————————
-Calling Functions—————————
GetExceptionText
GetExceptionText
StartServiceHost
Execute
Main

—Exception Message————————–
System.Net.Sockets.SocketException
An attempt was made to access a socket in a way forbidden by its access permissions
—Exception Stack Trace———————-
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 Inner Exception ——————–