将 WCF TCP 端点限制为管理员

发布于 2024-10-06 20:01:54 字数 317 浏览 1 评论 0原文

如何将可远程访问的 WCF 端点的访问限制为本地/域管理员


编辑:[PrincipalPermission(SecurityAction.Demand, Name = "AdminUser")]添加到我的WCF通道方法实现中后,尝试从我的客户端调用服务方法会抛出SecurityAccessDeniedException,这是进步。

如何让 Windows 提示用户输入新用户详细信息(或安全令牌),以便我能够以正确的用户身份重新启动 WCF 连接?

How do I restrict access of a remotely-accessible WCF endpoint to a local/domain administrator?


Edit: After adding [PrincipalPermission(SecurityAction.Demand, Name = "AdminUser")] to my WCF channel method implementation, trying to call the service method from my client throws a SecurityAccessDeniedException, which is progress.

How do I let Windows prompt the user for new user details (or a security token) so I can reinitiate the WCF connection as the correct user?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

浮云落日 2024-10-13 20:01:54

您可以通过添加到 WCF 服务中声明的方法中的 PrincipalPermissionAttribute 来执行此操作。

请参阅此链接:如何:使用 PrimaryPermissionAttribute 类限制访问

You can do this with the PrincipalPermissionAttribute added to the methods declared in your WCF service.

See this link: How to: Restrict Access with the PrincipalPermissionAttribute Class

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文