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? ...
Is there a way to get a list of roles a Windows authenticated user is in, without explicitly checking by WindowsPrincipal.IsInRole method? ...
I have a number of services that will be running under the security context of NT Authority\System as a Windows service (the services are NetTCP-based). There are six groups stored in Active Directory that will be allowed to access these services: Users Agents Approvers Administrators (three levels of admins) I know I can get the user ...
Hi Could you please explain me what is the anonymous identity used for? As far as I know windows does not have an anonymous account type ?! Kind Regards PK ...
Click Once deplyment. Application runs fine in VS2008. When running the deployed app throws exception on: WindowsIdentity.GetCurrent() Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. Click Once security settings: f...
Hello, I'd like to give the ASPNET user Full Control over several files, but it looks like I'll need to get the account's token first. Does anyone know how to impersonate the ASPNET account within a desktop app? Thanks! ...
When getting the username and/or SID of the current user, what is the preferred method? Is it using: WindowsIdentity.GetCurrent().Owner Or: WindowsIdentity.GetCurrent().User What is the difference between the two? This would be a great question for SuperUser.com, but alas, it's not live yet. Thanks! ...
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...
Hello, I'm trying to intercept WindowsAuthenticationModule to login into application as another user, but I cannot create new WindowsIdentity without knowing his password. The code will run under administrator privilegies, so, is there any way how to get user 'Login token' without his password? ...
I have scenario: There is an employee which is in role TeamDirector. There is another one which is normal employee. Team Director is sick so he use our app to set that normal employee has all rights of TeamDirector. This information is stored in DB. In our app I use Authorize att to check access to particular controller methods. I wrote...
I'm writing an ASP.net application and I'm working with the WindowsIdentity.GetCurrent() function. I want to know how (or if it's possible) to change what identity the ASP.net application runs as. I eventually want to run it as an account associated with the end-user. I understand I can do this with Windows Authentication in IIS, but ...
I am working on the very first project at my office where we will be using "Windows Identity Foundation" with Claims-Based-Authorization. To this end, Microsoft .net provides the ClaimsAuthorizationManager abstract class. In order to use this class, you override two methods: the constructor and CheckAccess(context as ClaimsAuthorizatio...
I'm writing an ASP.net application that uses Windows Identity Foundation. My ASP.net application uses claims-based authentication with passive redirection to a security token service. This means that when a user accesses the application, they are automatically redirected to the Security Token Service where they receive a security token...
I am wanting to list all the files in a folder that a user has read access to. The user visits the website and can use Forms Authentication for some aspects of the site (e.g. adding links etc), but I want to list files in a given folder using their Windows Credentials (since I have anonymous access turned off), hiding those they can't re...
I've been configuring some of my applications to use the Windows Identity Foundation. I use the passive redirection to get security tokens from a Security Token Service. I accomplished this by inserting WIF code into a logon web site that existed before I started using WIF and then using the "Add STS Reference" within the applications....
Hi there I'm working on an ASP.net app and i'm trying to impersonate a user I'm creating a windowsIdentity with a token WindowsIdentity winId = new WindowsIdenty( token ); this token was got by calling the un managed code [DllImport("advapi32.dll")] public static extern int LogonUserA(String lpszUserName, String lpszDomain, ...
Edit 6: Using Windows Integrated authentication (with an account that has access to the share and the database), I can get the list of files/directories. However, refresh the page and get an UnauthorizedAccessException. Perhaps a NetBIOS or ActiveDirectory limitation. 5 months and still no solution, other than 'use impersonation' (via P...
I am working on an application that uses windows authentication. Within this application, we give the user the ability to change their password. The user can change the password just fine. However, after they change their password, that is when things get weird. Sometimes they can navigate through the application just fine. Other tim...
In the Windows Identity Foundation (WIF), there is a class called ClaimsPrincipalPermission. The documentation on MSDN is very sparse. It states: ClaimsPrincipalPermission represents the permission required to access a resource. ClaimsPrincipalPermission takes in a string that represents the resource to be accessed, and a string t...
The following code sample used to return me windows id before, but now it doesn't work, and returns empty string, dunno why. function GetWindowsID: string; var Registry: TRegistry; str:string; begin Registry := TRegistry.Create(KEY_WRITE); try Registry.Lazywrite := false; Registry.RootKey := HKEY_LOCAL_...
On the client I have setup the bus with ImpersonateSender(true) My server is configured AsA_Server, which by default should have ImpersonateSender(true) I'm now trying to retrieve the WindowsIdentity, from inside a Handler var windowsIdentity = WindowsIdentity.GetCurrent(true); But this is giving me null. What am I doing wrong? ...