Dont know if someone have experienced the same problem but...
When we use the webpart in combination with the note board web part, we get an error about database access. After investigating the logs, we found the following:
Detected use of SPRequest for previously closed SPWeb object. Please close SPWeb objects when you are done with all objects obtained from them, but not before. Stack trace: at Microsoft.SharePoint.SPField.get_FieldsSAFullXML()
But, the note board worked before we added the site directory webpart. So, i had a look at the code:
GlobalMethods.cs, Line 274:
using (SPWeb thisWeb = thisSite.RootWeb)
SiteDataWebpart.cs, Line 149:
using (SPWeb thisWeb = SPContext.Current.Web)
I have tried changing the lines to not dispose of webs obtained through SPContext, but rather use the OpenWeb() method instead. The result is that the note board and the Site Directory can now co-exist on the same page.
Someone correct me if im wrong, but I dont believe you should dispose of SPContext.Current.Site, or SPContext.Current.Web - ever...?
'SPContext objects are managed by the SharePoint framework and should not be explicitly disposed in your code. This is true also for the
SPSite and SPWeb objects returned by SPContext.Site,
SPContext.Current.Site, SPContext.Web, and
Taken from the best practices:
Have anyone experienced similar problems?