I don't know why but this fixed it...

Below is how I had to do bind to the Active Dirctory without impersonation on:
----------------------------------------------------------------------
string sPath = "LDAP://serverName/cn=users, dc=mycom, dc=org";
string userName = "domainUser";                                         
string password = "domainPW";   
DirectoryEntry entry = new DirectoryEntry(sPath,userName,password);     


When I turned on impersonation everything died, I narrowed it down to not specifying 
the AuthenticationType, mind you, none of the authentication types worked when 
impersonation was off even type AuthenticationType.None caused an "Unknown Error".

The short of it is this works with impersonation on:
----------------------------------------------------------------------
string sPath = "LDAP://dc=mycom,dc=org";;                  
DirectoryEntry entry = new 
DirectoryEntry(sPath,null,null,System.DirectoryServices.AuthenticationTypes.Secure);

For some reason I cannot specify cn=users any longer. So far though, it seems to run 
quickly and reliably. I'm sure that will come back to haunt me. I hope this is useful 
to someone else.

<>< Ryan
                 


---
You are currently subscribed to dotnet as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

---------
Administrated by 15 Seconds : http://www.15Seconds.com
List Archives/Search : http://local.15Seconds.com/search
Subscription Information : http://www.15seconds.com/listserv.htm
Advertising Information: http://www.internet.com/mediakit/


Reply via email to