我有一个通过命名管道设置的服务器。它适用于域的管理员,但是当我在普通用户上测试客户端时,它给出了异常“访问路径被拒绝”。所以这就是我试图设置权限以授予域中所有经过身份验证的用户的访问权限。我在这里做错了什么?
服务器:
NamedPipeServerStream pipeServer = new NamedPipeServerStream("message-generator", PipeDirection.InOut, pipeThreads, PipeTransmissionMode.Message, PipeOptions.None);
PipeSecurity pipeSecurity = pipeServer.GetAccessControl();
pipeSecurity.AddAccessRule(new PipeAccessRule(@"localdomain\Authenticated Users", PipeAccessRights.FullControl, AccessControlType.Allow));
pipeServer.SetAccessControl(pipeSecurity);
客户:
NamedPipeClientStream pipeClient = new NamedPipeClientStream("servername", "message-generator", PipeDirection.InOut, PipeOptions.None, TokenImpersonationLevel.Impersonation))
服务器名称和域显然不同,但是在服务器上,当它到达 pipeServer.SetAccessControl 函数时,它给了我异常“UnauthorizedAccessException”。
任何帮助是极大的赞赏