--Update #2--
Here is the final code that worked for me. This uses WNetAddConnection2 to establish a connection first, before using DirectoryEntry.
Imports System.Runtime.InteropServices
Imports System.Net
Imports System.DirectoryServices
Imports System.IO
Module Module1
Sub Main()
Dim Computername As String = "SomeCompu...
Can some post the way to know if a particular user is a deactivated user in the windows ad ?
...
How do I Retrieve a list of computers in a FOLDER in a domain.
lets say i have maydomain.dom as my domain
and I have a folder containing some computers.
...
When using a DirectoryEntry to initialize a DirectorySearcher object, I've been just using the simple LDAP string of "LDAP://dc=mydomain,dc=com". The problem with this method is that on Windows XP, it will only use the LogonServer (the domain controller that was used when logging in to Windows). I've encountered cases where that domain...
I know random errors don't really exist in our business, but I've got no clue as to why this method is not working.
In short, this method searches for some properties starting from the root domain. It works great, except that it randomly gives me the following exception:
Error
System.ApplicationException: No
free/busy public fol...
I have a website which requires users to enter their corporate network username and password. It then looks for that account in Active Directory and gets a list of any email addresses associated with that account.
The problem I am having is that ONE incorrect password is locking out an account. Our domain policy is that an account will ...
I am using the System.DirectoryServices.AccountManagement class for querying the Active Directory.
I'm able to query the domain using various contexts fine, but every example I've found requires a domain name.
string domain = "MYDOMAIN";
PrincipalContext ctx= new PrincipalContext(ContextType.Domain, domain);
Normally this wouldn't be...
Hello, I have the following method used for searching for a User Group either on the local computer (done first) or in the Current Forest.
public string FindUserGroup(string group)
{
//Search local computer
using (DirectorySearcher searcher = new DirectorySearcher(new DirectoryEntry()))
{
searcher...
I am on Mac OS X 10.5.8. I am not sure exactly when this started happening, but I find that when I re-attach to a screen session that was started from an ssh session, anything relying on dscl (directory services), or the underlying getent stuff, fails.
If I start the session on that machine in Terminal, everything works. Only remotely s...
I am currently working on developing a sharepoint 2010 web part where I need to get a list of currently logged on users from a given domain. Can this be done using System.DirectoryServices.AccountManagement? If so how can some one give me code example?
...
Ok, this is an OpenLDAP newby question so bear with me. I haven't been able to find a straight answer on the webinets, so here we go:
Note: The ultimate goal is to have an OpenLDAP server set up as a proxy/cache for a "single" query to get all of the results in a master LDAP (if you're familiar with .Net's DirectoryServices dll, the app...
I am having an issue using the GetAuthorizationGroups method of the UserPrincipal class in a web application.
Using the following code, I am receiving "While trying to retrieve the authorization groups, an error (5) occurred"
PrincipalContext context = new PrincipalContext(ContextType.Domain, null, "DC=MyCompany,DC=COM", "username", "p...
I have a .net web application which needs to obtain the groups a user is a member of in Active Directory.
Todo this I am using the memberOf attribute on the users records.
I need to know the permissions required to read this attribute on all users records.
Currently I am getting inconsistent results when trying to read this attribute...
Could you help me and tell if im using the "using statement" correctly in my directoryservice function that gets distingushed name from my Active Directory. I want to dispose and close objects correctly.
Code:
Public Function GetObjectDistinguishedName(ByVal objClass As objectClass, _
ByVal returnValue As returnType, _
ByVa...
How can I list available ADSI (Active Directory Service Interfaces) service providers in C#?
...
Hi,
is there any way in MAC OS X server 10 to check the IP, User Name, Workstation name etc of the user logging in and out out Open Directory?
Any suggestions would be welcomed...
...
Hi, all
I am trying to retrieve all the email gruops and their mail address from company's AD system. I've got about 1800 groups but I've found there are about 20 gourps which I cannot get their properties. I tried in my outlook and got properties like mail address correctly. But I cannot get them by code, someone please help. Thanks. Be...
Hi,
I need to check whether a group given by name is a security group in AD using C# code.
I notice there's a property named "groupType" in groups properties, but I don't know what this property is used for. I checked several groups and find its value can be null, 8 or -2147483646. Is it associated with the security group type?
...
I've have several network based users (Mac OS X Directory Services). Some of them need local admin rights on their Mac OS X Workstations (10.6.4). They should be able to install software and to change system settings.
I added the users (i.e. /LDAPv3/server.domain.com/Users/harry) to the local (workstation's) admin group /Local/Default/G...
Very briefly then this is my situation. At my workplace I have to deal with 2 different domains x.com (the parent directory) and it's subdomain y.x.com
The parent domain(x.com) has all the active directory users, computers etc. From my local workstation which sits in the x.com domain i can read emails for the active directory users just...