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 !!!!
Showing posts with label directory services. Show all posts
Showing posts with label directory services. Show all posts
Sunday, June 29, 2008
Subscribe to:
Posts (Atom)
Blog Archive
About Me
Labels
- .net
- asp:calendar
- csharp.net
- directory services
- java
- java.io.zip
- windows identity