服务无法启动. System.ServiceModel.AddressAccessDeniedException:HTTP无法注册URL http://:… / … /.您的进程对该命名空间没有访问权限(有关详细信息,请参阅http://go.microsoft.com/fwlink/?LinkId=70353).
当我托管相同的服务时,ConsoleApplication上的地址相同 – 好的.
我看到了here和here的问题,但没有一个解决方案帮助我.
有没有人有想法?
LocalSystem Account (Windows):
The LocalSystem account […] has extensive privileges on the local computer,and acts as the computer on the network. Its token includes the NT AUTHORITY\SYSTEM and BUILTIN\Administrators SIDs; these accounts have access to most system objects.
Most services do not need such a high privilege level. If your service does not need these privileges,and it is not an interactive service,consider using the LocalService account or the NetworkService account. For more information,see Service Security and Access Rights.
所以你最好运行这个服务作为NetworkService,并给它适当的权限来使用您尝试使用的端口,如Configuring HTTP and HTTPS所述:
netsh http add urlacl url=http://+:80/MyUri user="NT AUTHORITY\NETWORK SERVICE"
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。