0
Nothing obvious jumps out at me - try it and see what happens. Since you're just returning a value, it won't break AD.
0
Thanks a lot. I had tried the following code. AD is not installed on my server. This will be tested on other server. Please verify n tell me if it is going to work. If not what other changes i'll have to make. Since it it not giving any error.
DirectoryEntry obDirEntry = null;
obDirEntry = new DirectoryEntry("WinNT://" + strDomain + "/" + strName);
System.DirectoryServices.PropertyCollection coll = obDirEntry.Properties;
object obVal = coll["FullName"].Value;
str = obVal.ToString();
return str;
0
Use Request.ServerVariables["LOGON_USER"] to get the DOMAIN\USER that is logged in.
You'll have to strip off the DOMAIN\ and compare the USER against userPrincipalName property of your users inn AD.
Do you know how to work with AD from .NET ?
If not, read up on the System.DirectoryServices namespace.