Gabriel,
You could use System.DirectoryServices.DirectorySearcher or
System.DirectoryServices.DirectoryEntry to look in either LDAP (Active
Directory) or WinNT (Windows 2000 or Windows XP) to see if the profile
exists.
For details see:
http://msdn.microsoft.com/library/de...oryObjects.asp
This page might be the most relevent, but I would suggest reviewing the
entire section:
http://msdn.microsoft.com/library/de...components.asp
Hope this helps
Jay
"Gabriel José Giraldo Navarro" <ga*********@hotmail.com> wrote in message
news:eX**************@TK2MSFTNGP10.phx.gbl...
Hi people,
How can I validate if a string with the format "MYDOMAIN\MyUser" is really
the logon name of one of the users on the Active Directory (on my domain),
or if it is a local user on the server ("MYSERVER\MyUser")?
What I want to do is to receive a string (in the format "XXXXX\YYYYY") and
verify if it is the logon name of a domain or a local user (throwing an
exception if neither of them).
Thanks for all the help you could give me!!