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 + "");
This is the place you can make a stop to have the code snippets, code logics and tactics. more to go. but just peep in, see it and experience in real !!!!
Sunday, June 29, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment