windows – HTTP无法注册URL

我正在尝试启动使用端口8081的服务.服务在启动后立即停止.我调查事件查看器,我看到了这个:

Service cannot be started.
System.ServiceModel.AddressAlreadyInUseException: HTTP Could not
register URL https:// +:8081/api/. Another application has already
registered this URL with HTTP.SYS. —>
System.Net.HttpListenerException: Failed to listen on prefix
‘https:// +:8081/api/’ because it conflicts with an existing
registration on the machine.

我试图用netsh注册url,但它说文件已经存在,但我无法删除预订,它不会出现在预订列表中(netsh http show urlacl).

netsh http add urlacl url=http:// +:8081/api/ user=\Everyone

Url reservation add Failed,Error: 183 Cannot create a file when that
file already exists.

netsh http delete urlacl url=https:// +:8081/api/

URL reservation delete Failed,Error: 2 The system cannot find the
file specified.

我可以做些什么来解决这个问题?

注意:该服务在其他计算机上运行良好.

您的删除命令使用的是https地址,而不是add命令中的http.删除’s’,它应该工作.

相关文章

Windows2012R2备用域控搭建 前置操作 域控主域控的主dns:自...
主域控角色迁移和夺取(转载) 转载自:http://yupeizhi.blo...
Windows2012R2 NTP时间同步 Windows2012R2里没有了internet时...
Windows注册表操作基础代码 Windows下对注册表进行操作使用的...
黑客常用WinAPI函数整理之前的博客写了很多关于Windows编程的...
一个简单的Windows Socket可复用框架说起网络编程,无非是建...