[Mono-list] Query about Mono's DirectoryEntry->RefreshCache() and other methods

Singh Singh " <apachemono@rediffmail.com
28 Sep 2004 11:28:41 -0000


 This is a multipart mime message


--Next_1096370920---0-203.199.83.39-26326
Content-type: text/html;
	charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

<P>=0AHi Folks,<BR>=0AI'm working on ASP.NET/C# web application hosted in A=
pache 2.0 w/ mod_mono module 1.0 on Red Hat Linux 9.0 . The application now=
 uses LDAP for search and retrieval in iPlanet Directory Server. Although i=
t worked fine when developed on Windows 2000 Server w/ IIS 5.0, the product=
ion version on Red Hat Linux 9.0 doesn't work for methods in System.Directo=
ryServices.<BR>=0A <BR>=0AMy code looks like this:<BR>=0A <BR>=0A----------=
-<BR>=0A...<BR>=0Ausing System.DirectoryServices;<BR>=0A...<BR>=0ADirectory=
Entry de =3D new DirectoryEntry(strLdapAddress + strLdapBasePath);<BR>=0ADi=
rectorySearcher searcher =3D new DirectorySearcher();<BR>=0A <BR>=0Ade.Auth=
enticationType =3D AuthenticationTypes.None;<BR>=0A <BR>=0Ade.Username =3D =
strCN;<BR>=0Ade.Password =3D strPassword;<BR>=0Astring name =3D de.Name; //=
force a bind<BR>=0A//de.RefreshCache();<BR>=0Asearcher.SearchRoot =3D de;<B=
R>=0Asearcher.Filter =3D strFilter;<BR>=0Asearcher.SearchScope =3D SearchSc=
ope.Subtree;<BR>=0Asearcher.PropertiesToLoad.Add(&quot;uid&quot;);<BR>=0Ase=
archer.PropertiesToLoad.Add(&quot;Phone&quot;);<BR>=0A <BR>=0Asearcher.Sort=
 =3D new SortOption(&quot;uid&quot;, SortDirection.Ascending);<BR>=0A <BR>=
=0ASearchResultCollection results =3D searcher.FindAll();<BR>=0A...<BR>=0A-=
----------<BR>=0A <BR>=0AFirst it complaint about RefreshCache() method -- =
&quot;System.DirectoryServices.DirectoryEntry.RefreshCache()&quot;.<BR>=0A =
<BR>=0AAfter commenting the RefreshCache() method call, it now says: &quot;=
The requested feature is not implemented&quot;.<BR>=0A <BR>=0AThis works fi=
ne on IIS 5.0 on Windows, i.e., Microsoft .NET version 1.1.<BR>=0A<BR>=0AAn=
y pointer to resolve this challenge will be higly appreciated.<BR>=0AThanks=
 in advance..&nbsp; <BR>=0A=0A</P>=0A<br><br>=0A<A target=3D"_blank" HREF=
=3D"http://clients.rediff.com/signature/track_sig.asp"><IMG SRC=3D"http://a=
ds.rediff.com/RealMedia/ads/adstream_nx.cgi/www.rediffmail.com/inbox.htm@Bo=
ttom" BORDER=3D0 VSPACE=3D0 HSPACE=3D0></a>=0A
--Next_1096370920---0-203.199.83.39-26326
Content-type: text/plain;
	charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi Folks,=0AI'm working on ASP.NET/C# web application hosted in Apache 2.0 =
w/ mod_mono module 1.0 on Red Hat Linux 9.0 . The application now uses LDAP=
 for search and retrieval in iPlanet Directory Server. Although it worked f=
ine when developed on Windows 2000 Server w/ IIS 5.0, the production versio=
n on Red Hat Linux 9.0 doesn't work for methods in System.DirectoryServices=
.=0A =0AMy code looks like this:=0A =0A-----------=0A...=0Ausing System.Dir=
ectoryServices;=0A...=0ADirectoryEntry de =3D new DirectoryEntry(strLdapAdd=
ress + strLdapBasePath);=0ADirectorySearcher searcher =3D new DirectorySear=
cher();=0A =0Ade.AuthenticationType =3D AuthenticationTypes.None;=0A =0Ade.=
Username =3D strCN;=0Ade.Password =3D strPassword;=0Astring name =3D de.Nam=
e; //force a bind=0A//de.RefreshCache();=0Asearcher.SearchRoot =3D de;=0Ase=
archer.Filter =3D strFilter;=0Asearcher.SearchScope =3D SearchScope.Subtree=
;=0Asearcher.PropertiesToLoad.Add("uid");=0Asearcher.PropertiesToLoad.Add("=
Phone");=0A =0Asearcher.Sort =3D new SortOption("uid", SortDirection.Ascend=
ing);=0A =0ASearchResultCollection results =3D searcher.FindAll();=0A...=0A=
-----------=0A =0AFirst it complaint about RefreshCache() method -- "System=
.DirectoryServices.DirectoryEntry.RefreshCache()".=0A =0AAfter commenting t=
he RefreshCache() method call, it now says: "The requested feature is not i=
mplemented".=0A =0AThis works fine on IIS 5.0 on Windows, i.e., Microsoft .=
NET version 1.1.=0A=0AAny pointer to resolve this challenge will be higly a=
ppreciated.=0AThanks in advance.. =A0=0A
--Next_1096370920---0-203.199.83.39-26326--