如何知道来宾用户是否正在运行应用程序 - C#?
我有一个 winForm 应用程序,我想知道访客用户正在运行它。 我怎样才能通过c#代码知道它?
谢谢。
I have a winForm application and I want to know of a guest user is running it.
how can I know it by c# code?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
这是巴里所说的优化版本。
Here's an optimized version of what Barry said.
这完全取决于您的用户的设置方式。
您可以使用组成员身份来确定用户是否是来宾,或者他们可能正在使用来宾帐户(尽管某些组织可能会禁用该帐户)。
That would depend entirely on how your users are setup.
You could use group membership to determine if a user is a Guest or they might be using the Guest account (although some organisations might disable that one).
您使用域身份验证吗?
如果您使用域身份验证,请获取当前用户详细信息
并检查用户是否是会员。
Are you using Domain Auth?
If you are using Domain Auth, get the current user details with
and check if user is a member or not.