创建命名管道(WCF)所需的最低OS权限 [英] Minimum OS Permissions required to create named pipe (WCF)

查看:103
本文介绍了创建命名管道(WCF)所需的最低OS权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在已登录用户的上下文下运行的exe.该exe使用WCF使其自己成为一个命名管道服务器(它将被多个客户端调用).

I have an exe that runs under the context of the logged-in user. The exe uses WCF to make itself a named pipe server (it will be called by multiple clients).

用户是否需要exe的特定权限才能创建命名管道?我尝试以具有最小权限的用户身份运行(即,仅在本地Users组中),但效果很好-但是我担心,当我部署到客户端站点时,可能会以某种方式限制用户表示命名管道创建无效.

Does the user need a specific permission for the exe to be able to create the named pipe? I've tried running as a user with fairly minimal permissions (i.e. just in the local Users group), and this works fine - but I'm concerned that when I deploy to the clients site, the users may be limited in some way that means the named pipe creation doesn't work.

推荐答案

本地登录的用户使用netNamedPipe绑定设置WCF服务的服务端不需要特殊权限.

No special permissions are required for a locally logged on user to set up the service end of a WCF service using the netNamedPipe binding.

但是,您确实需要担心客户端是否可以找到并连接到服务.这有两个方面:

However, you do need to worry about whether the clients can find and connect to the service. There are two aspects to this:

  1. 客户端必须在不是由网络登录建立的安全性上下文中运行(例如,在Web应用程序中模拟远程用户).这是因为WCF拒绝访问属于NETWORK USERS组成员的任何登录.
  2. 如果您在Vista或Windows7上运行,则如果希望对登录用户会话之外运行的客户端可以访问该服务,则该服务exe将需要以SeCreateGlobalPrivilege特权运行.这是因为WCF服务需要将管道名称发布到共享内存对象以使客户端能够找到它:如果WCF服务堆栈可以在Global名称空间(对所有登录会话可见)中创建此共享内存对象,则它将.但是,如果它没有必要的特权,它将在Local名称空间中创建共享内存对象(仅在同一登录会话中可见).将WCF服务部署为Windows服务是使用此特权使其运行并因此对会话外部的客户端可见的唯一简便方法.

更多详细信息

More details here if you are interested.

这篇关于创建命名管道(WCF)所需的最低OS权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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