Re: Getting the users fullname (Display Name in AD)

From: Joe Kaplan \(MVP - ADSI\) (joseph.e.kaplan_at_removethis.accenture.com)
Date: 10/08/03


Date: Wed, 8 Oct 2003 10:15:01 -0500

I would suggest doing a search for the user by samAccountName using the
DirectorySearcher component in the System.DirectoryServices namespace. With
that, you can view additional AD attributes of the user including their
display name and full name.

There is more information here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netdir/netds/searching_the_directory.asp?frame=true

There are also a few gotchas with using System.DirectoryServices in ASP.NET
due to security context and delegation issues that you should know about:

http://support.microsoft.com/default.aspx?scid=kb;en-us;329986

HTH,

Joe K.

"Tore Eriksmoen" <tore.eriksmoen@statoil.com> wrote in message
news:0c2401c38d96$05d9b370$a401280a@phx.gbl...
> Hi!
>
> I'm developing an ASP.NET-solution using VS.NET2003 in our
> corporate intranet. It uses Windows Authentication and all
> is fine.
>
> However I want to display the authenticated users fullname
> instead of 'domain\username' which is the result when
> using the 'User.Identity.Name' property in my code.
>
> Any solution to this?
>
>
> Best regards
> Tore Eriksmoen



Relevant Pages

  • Re: simple XSLT question
    ... It does display plain text I enter into the ... With that default namespace declaration your stylesheet needs to declare ... Martin Honnen ...
    (comp.text.xml)
  • Re: Looping through files in a directory
    ... Look at the classes in System.IO namespace. ... I susgest that you first ... I want to display the names of files that begin with Peter_ in a listbox. ... How can I loop through the files in that directory and display only those ...
    (microsoft.public.vsnet.general)
  • Iterating Exchange Public Folder Tree
    ... Unable to connect to the WMI namespace." ... ' Display the value of the AdministrativeGroup property. ... ' Display the value of the AssociatedPublicStores property. ...
    (microsoft.public.windows.server.scripting)
  • Re: creating services with UI
    ... I suppose you could create a monitoring winforms app, ... I would like to write a service in C# and I have the need to display a UI ... If I use the Windows Service ... I noticed that the System.Windows namespace is not ...
    (microsoft.public.dotnet.framework)
  • Getting the users fullname (Display Name in AD)
    ... corporate intranet. ... It uses Windows Authentication and all ... However I want to display the authenticated users fullname ...
    (microsoft.public.dotnet.security)

Quantcast