It looks like you might need SPSecurity.RunWithElevatedPrivleges . This allows you to run the code as if you were a farm administrator.application pool account. Be careful because it gives the user faster access to , , , .
SPSecurity.RunWithElevatedPrivileges(delegate()
{
using (SPSite topSite = new SPSite("URL_OF_YOUR_SITE_COLLECTION"))
{
}
});
source
share