Related questions
Get IPv4 addresses from Dns.GetHostEntry()
I've got some code here that works great on IPv4 machines, but on our build server (an IPv6) it fails. In a nutshell:
IPHostEntry ipHostEntry = Dns.GetHostEntry(string.Empty);
The documentation for GetHostEntry says that passing in string.Empty will …
Get domain name
My computer is in a Domain (Active Directory) and I need to get the domain name dynamically. I found the following code on the internet:
SelectQuery query = new SelectQuery("Win32_ComputerSystem");
using (ManagementObjectSearcher searcher = new ManagementObjectSearcher(query))
{
foreach (ManagementObject mo …
C# Active Directory: Get domain name of user?
I know that this type of question has been asked before, but other methods are failing me right now.
As it stands our windows service polls AD, given an LDAP (i.e. LDAP://10.32.16.80) and a list of usergroups within that …