windows-principal

WindowsPrincipal.IsInRole and universal vs. global active directory groups

Does anybody know how to make WindowsPrincipal.IsInRole("domain\role") work with active directory universal groups? Let's say the current user is a member of a group called Role in a domain called domain, and that the Role group is a Global group in active directory. The following code would then yield result = true: WindowsPr...

Why does Vista report that my Windows account not being in Adminstrators Role?

Under Windows Vista, when I check whether my current user account is in Administrators role, I am getting a negative, as shown in the following picture. Can anyone tell me why I am not in the Administrators role? When I do the check if I am in "Debugger Users" role, I am getting "True" Thank you. ...

How can I retrieve all the roles a user is in?

Is there a way to get a list of roles a Windows authenticated user is in, without explicitly checking by WindowsPrincipal.IsInRole method? ...

How can I temporarily impersonate a user to open a file?

I would like to temporarily impersonate a domain user account to read in a file on a network drive from an ASP.NET site. I would rather not set up impersonation for the entire site or set up a mapped drive on the server. ...

How can i get the WindowsIdentity or WindowsPrincipal of a WCF Claim / SecurityIdentifier (SID)?

I'm trying to allow all users in the Administrators group access through WCF. internal sealed class AuthorizationManager : ServiceAuthorizationManager { public override bool CheckAccess(OperationContext operationContext) { base.CheckAccess(operationContext); ReadOnlyCollection<ClaimSet> claimSets = operationContext.Se...