I'm useing 'Linq to SharePoint' and when I get a SharePoint context the list is empty (user haven't permission to this list).
using (Sy开发者_如何学PythonstemOcenContextDataContext ctx = new SystemOcenContextDataContext("url"))
{
// my code
}
I have tried something like this:
SPSecurity.RunWithElevatedPrivileges(delegate()
{
using (SystemOcenContextDataContext ctx = new SystemOcenContextDataContext("url"))
{
// my code
}
});
but the context lists are still empty :( Any ideas?
this is another bug :) I find solution:
http://blogs.msdn.com/b/sowmyancs/archive/2010/09/19/linq-to-sharepoint-and-runwithelevatedprivileges.aspx
精彩评论