Hi Mike, man you're quick! I think (hope) I've tracked my issue down to a missing letter in a database field. Hey let me ask you this - I'm trying to extend the AD provider and i've created a procedure to grab all the Active AD groups in our system. Now, I would like to cache that object, but I haven't worked with the DNN caching before. Here is what I have...Does this look right? Also, now, if I want to call the object from somewhere else in the application ...what is the best way to do it? Oh...and also on the AddFilter how would I use two filters? for example, if I wanted to achieve: "(&(objectClass=group)(cn=CS_*))". is it as simple as adding another filter? Thanks very much!!
Public Overrides Function GetAllGroups() As System.Collections.ArrayList
Dim _config As DotNetNuke.Authentication.ActiveDirectory.Configuration = ActiveDirectory.Configuration.GetConfig()
Dim strCacheKey As String = GroupCacheKey
Dim dirEntries As ArrayList = CType(DataCache.GetCache(strCacheKey), ArrayList)
If dirEntries Is Nothing Then
Dim RootDomain As Domain = GetRootDomain()
'create instance fo the direcory searcher
Dim objSearch As New Search(RootDomain)
'set the search filter
objSearch.AddFilter(Configuration.ADSI_CLASS, ADSI.CompareOperator.Is, ObjectClass.group.ToString())
'populate array list with group objects
dirEntries = objSearch.GetEntries
DataCache.SetCache(strCacheKey, dirEntries, 600)
End If
Return dirEntries
End Function
*had to edit...the code got all chewed up.