MachineName = DomainName ???

  • Thread starter Thread starter Chris Roth
  • Start date Start date
C

Chris Roth

Hi All,

We're getting a situation where occasionally our queries to MachineName and
DomainName are both returning the domain. We're using the following calls:

System.Environment.MachineName

System.Environment.UserDomainName

The application deals with Active Directory, so we are assuming that our
users are system admins who are logged into domains, not workgroups. Is
there a bug in the framework, or am I just a net-tard?

Any help, much appreciated.



Chris
 
Chris,

Even on a machine that is a member of a domain, a user can log in under an
account defined on the local machine, as opposed to the domain. In such
cases, the local machine name will be returned from
System.Environment.UserDomainName.

HTH,
Nicole
 
Back
Top