HTTP could not register URL http://+:8000/.... Your process does not have access rights to this namespace

windows 7, Visual Studio 2013

在托管 Windows 服务中承载 WCF 服务时报错:

 HTTP could not register URL http://+:8000/.... Your process does not have access rights to this namespace

原因:

通过Widows创建Url失败

解决方案:

用管理员账号运行以下命令

netsh http add urlacl url=http://+:8000/Service user=mylocaluser

参考:

http://stackoverflow.com/questions/885744/wcf-servicehost-access-rights

原文地址:https://www.cnblogs.com/stevenawake/p/4988324.html