O
Ojas
What is the best way to programmatically query a user's active
directory site name?
directory site name?
Ojas said:What is the best way to programmatically query a user's active
directory site name?
Thanks. I have a background server application that the AD user does
not directly interact with, or connect to, and so I don't know the IP
address or the machine name that the user is currently using. Given
that context, is there anyway for me to determine the current site
that an AD user is associated with?
Jorge is absolutely correct here. You might want to check out the
ActiveDirectorySite.GetComputerSite method to see if that helps you.
Florian Frommherz said:Ojas,
Thanks. I have a background server application that the AD user does
not directly interact with, or connect to, and so I don't know the IP
address or the machine name that the user is currently using. Given
that context, is there anyway for me to determine the current site
that an AD user is associated with?
Users don't have sites. The site information is attached to the machine
via the IP address that it is configured to. The IP<->Site definition is
made in Active Directory. The only way to figure the site a user has
currently logged on to is the machine and the ip address.
cheers,
Florian
--
Microsoft MVP - Group Policy
eMail: prename [at] frickelsoft [dot] net.
blog: http://www.frickelsoft.net/blog.
Maillist (german): http://frickelsoft.net/cms/index.php?page=mailingliste