userprincipal Questions
2
Solved
For some reason GetAuthorizationGroups() seems to be taking around 20 seconds to return the groups. I am using this code:
UserPrincipal user;
// This takes 20 seconds
user.GetAuthorizationGroups(...
Cariecaries asked 4/6, 2014 at 15:10
6
Solved
I too have a long running service using plugins and appdomains and am having a memory leak due to using directoryservices. Note that I am using system.directoryservices.accountmanagement but it is ...
Weaponeer asked 14/6, 2012 at 13:34
2
Solved
C# Add User to Active Directory - The attribute syntax specified to the directory service is invalid
I am having an issue when attempting to create a new user in active directory. I followed the steps provided in this link for using PrincipalContext (with the exception that I am only doing one use...
Superordinate asked 12/6, 2014 at 20:18
2
Solved
I do the extension of the UserPrincipal class to retrieve some missing properties that i need:
[DirectoryObjectClass("user")]
[DirectoryRdnPrefix("CN")]
class UserPrincipalExt : UserPrincipal
{
p...
Lorianne asked 17/7, 2014 at 8:4
3
Solved
Why does the code below work fine when I run my web application localhost but not when I install it to an IIS server?
using (HostingEnvironment.Impersonate())
{
UserPrincipal activeUser = UserPri...
Cancroid asked 21/6, 2012 at 12:40
2
I want do get Active Directory Properties from a user and I want to use System.DirectoryServices.AccountManagement.
my code:
public static void GetUserProperties(string dc,string user)
{
Princ...
Shovelnose asked 11/1, 2013 at 12:31
4
How can I get a list of Local Windows Users (Only the Users that appear in the windows Logon Screen)
I have tried many methods using Windows Principle library & WMI Select commands. I keep get...
Hindenburg asked 5/10, 2012 at 15:34
5
Solved
I am using the System.DirectoryServices.AccountManagement part of the .Net library to interface into ActiveDirectory.
Having called GetMembers() on a GroupPrincipal object and filter the results, ...
Trellis asked 26/11, 2010 at 10:54
2
I want to get the list of groups which the user is in.
This is my code:
PrincipalContext ctx = new PrincipalContext(ContextType.Domain, "mydomain.ac.uk", "DC=mydomain,DC=AC,DC=UK", "user", "pass...
Lenardlenci asked 20/4, 2012 at 10:15
1
Solved
I am trying to authenticate with a kerberos/HTTP host. Using Apache HttpClient as my client - and a slightly modified version of this source.
My Kerberos authentication goes perfectly fine, and I w...
Infiltration asked 7/2, 2014 at 13:34
1
i found this post to get the security groups of a user.
I had to change it a bit so it looks like this:
public List<GroupPrincipal> GetGroups(string userName, string userPassword, string us...
Agglutinative asked 4/10, 2013 at 10:20
1
In a webapplication with Spring MVC and Spring Security.
Is there a way to set UserPrincipal manually?
I need to switch to another user by an admin part of my webapplication. In my controller, is...
Cogen asked 12/12, 2011 at 14:55
1
I have the following AD forest with two trees:
Domain1. Has two child domains Domain2 and Domain3
Domain4. Doesn't have child domains.
DNS name of the Domain1 is domain1.local. DNS name of the...
Crymotherapy asked 9/9, 2013 at 9:1
2
The following code only works while only Windows Authentication is enabled in IIS for local users on our network.
using (PrincipalContext ctx = new PrincipalContext(ContextType.Domain))
{
UserPri...
Rhizo asked 13/3, 2013 at 9:27
1
Solved
I'm attempting to find a User by username in Active Directory.
This works:
const string Domain = "SLO1.Foo.Bar.biz";
const string Username = "sanderso";
PrincipalContext principalContext = new P...
Heart asked 7/1, 2013 at 23:11
0
assuming the local account name is "JohnDoe" & the local machine name is "Development"...
In a clear, unambiguous functional example what should the value for userPrincipalName be?
<ident...
Lizarraga asked 18/12, 2012 at 21:16
2
Solved
I am trying to determine if a user is a member of an Active Directory (AD) group for an internal ASP.NET 4.0 application. The code below throws an "Attempted to access an unloaded appdomain" except...
Hypophysis asked 23/8, 2011 at 22:36
1
Solved
I am using ASP.NET MVC 4 and Windows Authentication.
When I am using VisualStudio everything works fine, but when I deploy my site an exception is thrown.
var emailAddress = UserPrincipal.Current....
Avebury asked 1/6, 2012 at 8:31
2
Solved
I get the username of the connected user (using j_security_check) this way, through a managed bean:
......
username = FacesContext.getCurrentInstance().getExternalContext().getUserPrincipal().get...
Cedrickceevah asked 26/5, 2011 at 15:39
1
Solved
System.DirectoryServices.AccountManagement can be extended to support additional properties for reading and writing AD properties.
Is anyone aware of a full/complete sample implementation that wor...
Pock asked 3/7, 2011 at 14:13
1
Solved
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/e...
Divers asked 18/8, 2010 at 18:52
1
© 2022 - 2024 — McMap. All rights reserved.