Add the Namespace
"system.directoryServices;"
"using System.Web.Security;"
Code Logic:
System.Security.Principal.WindowsIdentity wi = System.Security.Principal.WindowsIdentity.GetCurrent();
string[] a = Context.User.Identity.Name.Split('\\');
System.DirectoryServices.DirectoryEntry ADEntry = new System.DirectoryServices.DirectoryEntry("WinNT://" + a[0] + "/" + a[1]);
string Name = ADEntry.Properties["FullName"].Value.ToString();
Response.Write(" + Name + "");
Sunday, June 29, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment