"System.ServiceModel.AddressAlreadyInUseException:HTTP 无法注册 URL http://+:9999/



我正在尝试启动服务并收到错误。

System.ServiceModel.AddressAlreadyInUseException: HTTP could not register URL http://+:9999/. Another application has already registered this URL with HTTP.SYS. ---> System.Net.HttpListenerException: Failed to listen on prefix 'http://+:9999/' because it conflicts with an existing registration on the machine.
   at System.Net.HttpListener.AddAllPrefixes()
   at System.Net.HttpListener.Start()
   at System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
   --- End of inner exception stack trace ---
   at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
   at System.ServiceModel.Channels.CommunicationObject.EndOpen(IAsyncResult result)
   at System.Web.Http.SelfHost.HttpSelfHostServer.OpenListenerComplete(IAsyncResult result)

似乎您已经在端口 9999 上运行了一些服务。

您可以转到资源监视器和网络选项卡。
在"TCP 连接"部分中,检查本地端口列以检查哪个服务已在使用此端口。

希望这有帮助。

相关内容

最新更新