侦听 IP Endpoint=10013:0.0.0.0 时发生 TCP 错误(29999:尝试以访问权限禁止的方式访问套接字)。

如果您看到以下错误,则您的机器上可能正在运行 docker 或其他 NAT。

 

您可以使用以下命令检查 29999 端口是否为 NAT 保留。 结果给出了左/右列的范围,所以看看那里。

netsh 接口 ipv4 显示excludedportrange 协议=tcp

结果通常是这样的。

协议 tcp 端口排除范围

起始端口 结束端口
———— ————
9799 9799
50000 50059 *

* – 管理端口排除。

解决此问题的方法是重新启动 NAT:

净停止赢
净开始赢

 
错误如下所示:

15:27:33.557-错误:服务:错误启动服务主机:
---------------
2021-12-06 03:27:33
请将此文件通过电子邮件发送至 [电子邮件保护]
以及对你正在做的事情的描述
---------------
——XPressEntryService v2.9.55.555——
——调用函数—————————
-调用函数—————————
获取异常文本
启动服务主机
执行
主要

—异常信息——————————
系统.ServiceModel.CommunicationException
侦听 IP Endpoint=10013:0.0.0.0 时发生 TCP 错误(29999:尝试以访问权限禁止的方式访问套接字)。
—异常堆栈跟踪————————-
在 System.ServiceModel.Channels.SocketConnectionListener.Listen()
在 System.ServiceModel.Channels.BufferedConnectionListener.Listen()
在 System.ServiceModel.Channels.ExclusiveTcpTransportManager.OnOpen()
在 System.ServiceModel.Channels.TransportManager.Open(TransportChannelListener channelListener)
在 System.ServiceModel.Channels.TransportManagerContainer.Open(SelectTransportManagersCallback selectTransportManagerCallback)
在 System.ServiceModel.Channels.TransportChannelListener.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.ConnectionOrientedTransportChannelListener.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.TcpChannelListener`2.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
在 System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
在 System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open()
在 XPressEntryServicesHost.cXPEServiceHost.StartServiceHost(Int32 iSSLPort, String sCertThumbprint) in c:\telaeris\GitHub\XPressEntry-Desktop\XPressEntryService\cXPEServiceHost.vb:line 305
—开始内部异常——————
---------------
2021-12-06 03:27:33
请将此文件通过电子邮件发送至 [电子邮件保护]
以及对你正在做的事情的描述
---------------
——XPressEntryService v2.9.55.555——
——调用函数—————————
-调用函数—————————
获取异常文本
获取异常文本
启动服务主机
执行
主要

—异常信息——————————
System.Net.Sockets.SocketException异常
试图以访问权限禁止的方式访问套接字
—异常堆栈跟踪————————-
在 System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
在 System.Net.Sockets.Socket.Bind(EndPoint localEP)
在 System.ServiceModel.Channels.SocketConnectionListener.Listen()

——结束内部异常—————————