Hi Mont,
does binding to LDAP://rootDSE <ldap://rootDSE/> do
what you want?
I don't have 2 domains to test it on, but this seems to
suggest it might
work:
http
://msdn.microsoft.com/en-us/library/ms677945(VS.85).aspx
"In this case, a default domain controller from the
domain that the security
context of the calling thread is in will be used. If a
domain controller
cannot be accessed within the site, the first domain
controller that can be
found will be used"
the defaultNamingContext should tell you the domain
distinguished name (what
I think you mean by long name) and the serverName property
should give you
the name of the server
HTH
James
On Thu, Jul 10, 2008 at 12:34 AM, Mont Rothstein
<mont.rothstein gmail.com>
wrote:
> I am looking for a way to get information about the
domain/directory server
> that the current user is logged in under. I need more
than the short name.
> I need the long name and/or the server's
name/address.
> The problem I am trying to overcome is two domains on
the same network with
> the same short name (yes I know, can't change it,
customer's network).
>
> I have the server name/address of one of the domain
directory servers and I
> need to determine if the user is logged into that one
or a different one.
>
> Any ideas?
>
> Thanks,
> -Mont
>
> ===================================
> This list is hosted by DevelopMentor(R) http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com
>
===================================
This list is hosted by DevelopMentorŪ http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|