Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Real name lookup

Status
Not open for further replies.

ashuk73

Technical User
Oct 9, 2003
6
DE
Hi, I have been trying to implement a intranet web site that will use Integrated Windows Authentication to identify the different users to the site. This works OK, but if I try and find out the 'real' name of the users, using Directory Services, it works OK from my server, as me, but from a client machine I get the error "Specified directory service attribute or value does not exist". Microsoft seem to indicate that this is because I do not have a primary token.

Should I be finding the real name using a different approach, or can anyone point me in the right direction?

Thanks in advance,

Ashley
 
How about User.Identity.Name

--
Regards,
Mike
 
Hi Mike,
Thanks for your reply. I have been using
System.Security.Principal.WindowsIdentity.GetCurrent().Name;
but tried as you suggested, User.Identity.Name;


Both of these return the user in the format
<DOMAIN>\<username>

But I really want to get their 'real name',
eg 'Ashley Holland' so that is what I can get using
DirectoryServices.

Should User.Identity.Name return a real name?

Cheers,
Ashley
 
User.Identity.Name returns the domain\username. That's the only method I'm familiar with.

--
Regards,
Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top