How do I detect if my program runs in an Active Directory environment?
active-directory, c#
Solution
Try getting Environment.UserDomainName and comparing it to Environment.MachineName. If the two are the same then it's likely that the user does not have a domain. If they are not the same then the user is logged into a domain which must have a directory server.
Problem
How do I detect if my program runs in an Active Directory environment? I'm using C# and .Net 2.0