Showing posts with label new SPSite. Show all posts
Showing posts with label new SPSite. Show all posts

Thursday, February 05, 2009

RunWithElevatedPrivileges

We have developed a series of business web services leveraging SharePoint. However, some of our users sometimes ran into security issues when their security level was Contributor.

Luckily I read this article from MSDN which describe that the
new SPSite()
requires privileges above Contributor to work. Running the code in the context of RunWithElevatedPrivileges sovles the problem. Fantastic.