请教:如何判断当前计算机用户是域登录还是本地登录呢
WindowsIdentity currentIdentity = WindowsIdentity.GetCurrent();
WindowsPrincipal currentPrincipal = new WindowsPrincipal(currentIdentity);
我在我本地分别测试了连接到域和断掉网线两种情况,在两种情况下用同一个用户登录计算机, 好像两种情况下currentIdentity 和 currentPrincipal 没什么区别的,
如何才能判断当前用户是否是在域domain中呢?
谢谢各位帮忙