WCF服务访问权限:无权访问该命名空间 [英] WCF Service Access right: No access rights to this namespace

查看:379
本文介绍了WCF服务访问权限:无权访问该命名空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到了下面的错误与任务调度运行我的程序时:

I'm getting the the following error while running my program with the task scheduler:

HTTP不能注册网址HTTP:/ / +:4711 / myWCFService /。您的
进程没有(见
HTTP访问权限,这个命名空间: //go.microsoft.com/fwlink/?LinkId=70353 详情)。 --->
System.Net.HttpListenerException:访问被拒绝

HTTP could not register URL http://+:4711/myWCFService/. Your process does not have access rights to this namespace (see http://go.microsoft.com/fwlink/?LinkId=70353 for details). ---> System.Net.HttpListenerException: Access is denied

以管理员身份运行是不幸的是我的问题没有解决方案。我也试图注册netsh的HTTP地址,但我发现还是同样的错误。

Run as administrator is unfortunately no solution for my problem. I also tried to register the http address with netsh but I'm getting still the same error.

推荐答案

什么的netsh 命令你跑?

netsh http add urlacl http://+:4711/ user=DOMAIN\USER

在你的机器,内置的Administrator帐户在所有的HTTP命名空间保留的隐含所有权,所以你需要委派特定的命名空间保留的所有权(如上面)目标帐户将运行在HTTP端点。你需要确保你做到这一点以管理员身份运行执行的netsh 命令。

On your machine, the built-in administrator account has implicit ownership of all HTTP namespace reservations, so you need to delegate ownership of the specific namespace reservation (like above) to the target account that will be running the HTTP endpoint. You do this by ensuring you Run as administrator before performing the netsh command.

要检查哪些命名空间保留到位,运行:

To check what namespace reservations are in place, run:

netsh http show urlacl

这篇关于WCF服务访问权限:无权访问该命名空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆