[Mono-devel-list] System.DirectoryServices exception when using OpenLDAP for Win32

Rafael Teixeira monoman at gmail.com
Wed Oct 6 12:17:29 EDT 2004

Hi Andres,

Seems like you are getting some LDAP-exception, but it is masked by
another one because probably it can't get the exception text resource
for your current culture (sp-ES ?). Can you try forcing your current
culture to en-US in the program, to test that hipothesis?

Just guessing from the stack trace,


On Wed, 6 Oct 2004 15:18:16 +0200, Gomez Aragoneses, Andres
<agomez at wke.es> wrote:
> Hello.
> I am developing a web app to access to an LDAP server that I have installed
> with OpenLDAP on a Win32 machine. I am running Mono 1.0.1 for Windows and as
> I can see in the following URL, I can use System.DirectoryServices:
> http://www.dotnet247.com/247reference/msgs/36/182188.aspx
> But when I try to do the same, I get the following exception:
> System.ArgumentNullException: Argument cannot be null.
> in <0x00075> System.String:FormatHelper
> (System.Text.StringBuilder,System.IFormatProvider,string,object[])
> in <0x0003a> System.String:Format (System.IFormatProvider,string,object[])
> in <0x0015d> Novell.Directory.Ldap.Utilclass.ResourcesHandler:getMessage
> (string,object[],System.Globalization.CultureInfo)
> in <0x00013> Novell.Directory.Ldap.Utilclass.ResourcesHandler:getMessage
> (string,object[])
> in <0x000b9> Novell.Directory.Ldap.LdapException:getExceptionString (string)
> in <0x00013> Novell.Directory.Ldap.LdapException:ToString ()
> in <0x001e3> System.Web.HttpException:GetDefaultErrorMessage ()
> in <0x00044> System.Web.HttpException:GetHtmlErrorMessage ()
> in <0x001cf> System.Web.HttpRuntime:FinishRequest
> (System.Web.HttpContext,System.Exception)
> in <0x000e9> System.Web.HttpRuntime:OnHandlerReady (System.IAsyncResult)
> in <0x0005a> (wrapper delegate-invoke)
> System.MulticastDelegate:invoke_void_IAsyncResult (System.IAsyncResult)
> in <0x00058> System.Web.HttpAsyncResult:Complete
> (bool,object,System.Exception)
> in <0x0022a> StateMachine:ExecuteNext (System.Exception)
> in <0x0004b> StateMachine:ExecuteNextAsync (System.Exception)
> in <0x0001f> StateMachine:Start ()
> in <0x00064>
> System.Web.HttpApplication:System.Web.IHttpAsyncHandler.BeginProcessRequest
> (System.Web.HttpContext,System.AsyncCallback,object)
> in <0x002e9> System.Web.HttpRuntime:InternalExecuteRequest
> (System.Web.HttpWorkerRequest)
> Isn't this class fully implemented yet? Is this class compatible with
> OpenLDAP (instead of Active Directory)? Which is the difference between
> using this class and Novell.Directory.Ldap libraries?
> I am not sure, but as I can see here
> [http://www.go-mono.com/class-status-System.DirectoryServices.html] this
> class is not fully implemented, but I also have found that the attribute
> "System.DirectoryServices.DirectoryEntry.Properties", which is a collection,
> is not present on the list! Why? (I thought that it should appear and point
> to a "TODO" icon...).
> My code:
>   DirectoryEntry oDE = new DirectoryEntry("ldap://localhost/cn=Andres
> Gomez,dc=wke,dc=es",
>                                           "cn=Admin,dc=wke,dc=es",
> "my_password",
>                                           AuthenticationTypes.ServerBind);
>   oDE.Properties["homePhone"].Add("91-3514304");
>   oDE.CommitChanges();
>   oDE.Close();
> Thanks in advance,
>         Andres Gomez
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list

Rafael "Monoman" Teixeira
"Eu poderia suportar, embora não sem dor, que tivessem
ido todos os meus amores, mas enlouqueceria se perdesse
todos os meus amigos!
A alguns deles não procuro, basta-me saber que eles existem.
Esta mera condição me encoraja a seguir em frente pela vida....
mas é delicioso que eu saiba e sinta que os adoro,  
embora não declare e não os procure sempre".
        Vinicius de Moraes - O "Poetinha"
My bad translation:
"I could survive, not without pain, that all my lovers
would disappear, but would be driven crazy if 
I had lost all my friends!
Some I don't even have to reach, I just need to know that they exist.
This mere condition makes me brave enough to go ahead with my life...
but it is sweet that I know and feel that I love them,
even if I don't state it openly and reach for them always."
        Vinicius de Moraes - Brazilian Poet

More information about the Mono-devel-list mailing list