userprincipal

Get users full name from Machine Context

I have and ASP.NET application that runs on our intranet. In production I can get the user from the domain context and have access to lots of information including their first and last name (UserPrincipal.Givename and UserPrincipal.Surname). Our test environment is not part of the production domain and test users do not have domain acco...

How do I access an incoming request's endpoint (service/user)principalname?

I've had an issue with security in my WCF server, so now we authenticate each request via ServiceSecurityContext.Current.WindowsIdentity. However now, for other reasons, in case that value is null, we need to access the endpoint corresponding to the service being requested and get the ServicePrincipalName or UserPrincipalName supplied ...

Why does "request.getUserPrincipal().getName()" sometimes return a blank string?

Has somebody an idea, why the getName() method of the UserPrincipal sometimes provides an empty String? Most of the time it returns the correct user name but not every time. This behaviour does occur randomly. I can start the application, run the command and it works. The next time I start the application and run the command (exactly th...

Extending UserPrincipal; FindByIdentity() fails

Extending UserPrincipal to take advantage of its built-in properties... running into an issue when we overload the FindByIdentity() method. From Microsoft's example at http://msdn.microsoft.com/en-us/library/bb384372%28VS.90%29.aspx (parts excluded for brevity): [DirectoryRdnPrefix("CN")] [DirectoryObjectClass("inetOrgPerson")] publi...