我怎样才能知道,如果一台计算机是一个特定的Windows域在C#中的一部分 [英] How can I tell if a computer is a part of a specific Windows domain in C#

查看:156
本文介绍了我怎样才能知道,如果一台计算机是一个特定的Windows域在C#中的一部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经得到了我要开始部署外部内部C#应用程序。我有功能,我只想提供给内部用户,但我不想与多个发行打扰。我也不想改变内部用户当前使用的程序的方式。

I've got an internal C# application that I want to start deploying externally. I've got features that I only want available to internal users, but I don't want to bother with multiple releases. I also don't want to change the way that internal users are currently using the program.

所以,我在想什么是:
1)检查程序正在运行的电脑的域名。如果它是我公司的域名,然后打开内部特征。该程序可以对从域和离线运行断开PC上运行。

So, what I'm thinking is: 1) Check the domain of the PC that the program is running on. If it's my company's domain, then turn on the internal features. The program may run on PCs that are disconnected from the domain and running offline.

2)具有最重要的是密码选项来启用内部特征。

2) Have a password option on top of that to enable internal features.

因此​​,在域中的计算机内部用户,它看起来它总是做完全一样的。
对于在非域中的计算机内部用户,他们必须打开内部功能的能力。
对于外部用户,他们没有得到内部特征。

So, for internal users on domain machines, it looks exactly the same as it always did. For internal users on non-domain machines, they have the ability to turn on the internal features. For external users, they don't get the internal features.

什么是执行的最好方式是一个域的计算机一部分,即使离线在C#中?

What's the best way to implement the "is the computer part of a domain, even if offline" in C#?

推荐答案

检查的 Environment.UserDomainName

这篇关于我怎样才能知道,如果一台计算机是一个特定的Windows域在C#中的一部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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