Thanks, I'm looking into it now:
System.DirectoryServices.DirectoryEntry de = new
System.DirectoryServices.DirectoryEntry();
string fullname = de.Properties["displayName"].Value.ToString();
This code isn't working because I need to set the de.Path property before
executing the last line.. I'm not sure how to get the domain name the user
is logged into....Any tips would be great....
I've tryed, with out luck using this statment:
string domain = de.Properties["defaultNamingContext"][0];
This statement gives me an error message saying "This domain do not exist"
(or something like that, the error message I get on my computer is in
Norwegian and I translated it into English... I'm a native Norwegian)
What am I doing wrong here?
Any tips would be received with great appreciation!
Jeff
"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:uK**************@TK2MSFTNGP05.phx.gbl...
Ask the user to put it into a form. ;-)
Seriously, though, if the user is logged in to Active Directory, you
should be able to use the System.DirectoryServices namespace and classes
to query the Active Directory for this information.
--
HTH,
Kevin Spencer
Microsoft MVP
Professional Numbskull
Hard work is a medication for which
there is no placebo.
"Jeff" <it************@hotmail.com.NOSPAM> wrote in message
news:un*************@TK2MSFTNGP02.phx.gbl... OS: XP pro
IDE VS 2005 .NET
ASP.NET 2.0
System.Security.AccessControl.SecurityInfos.Owner. ToString() returns
domain\username...if the domain is named "TEST" and username is "per"
then this statement returns TEST\per....
But what code must I do if I went to the fullname of the user?
Jeff