A method of the SPSecurity class, RunWithElevatedPrivileges executes the specified method with Full Control rights even if the user does not otherwise have Full Control.

learn more… | top users | synonyms

5
votes
3answers
8k views

How to run with elevated privileges in application page?

I want to get a list item that the current user does not have access to but I need to get it in code. When I use SPSecurity.RunWithElevatedPrivileges that does not work. It's because I'm using the ...
0
votes
1answer
236 views

MOSS 2007 Permission error iterating users in group

The following code, though run with elevated privildges, redirects to an access denied error page saying "You are currently signed in as: (my non-admin account)." What am I doing wrong? ...
2
votes
3answers
3k views

SPSecurity.RunWithElevatedPrivileges working on Windows Server 2003/SP2007 and not on 2008/SP2010

I have this simple code in C# using sharepoint: SPSecurity.RunWithElevatedPrivileges(delegate() { SPSite site = new SPSite("http://localhost:333"); }); When i execute it on a Windows Server ...
8
votes
2answers
2k views

Thread Abort Issue with SharePoint SPWeb.Properties.Update()

I have a custom web service that runs in SharePoint 2007 as well as SharePoint 2010. I am currently testing only in SharePoint 2010 in my dev environment. I have some code that does the following: ...
0
votes
2answers
83 views

Run With Elevated Priv

Will RWEP add a file to a folder it has "Read" permissions for know sharepoint groups (but no sharepoint\system group added)?
1
vote
5answers
1k views

How to use SP Service Account to add an item (with object model)?

I can add an item to SharePoint (with the object model) when I am logged in to SharePoint with an administrative account. However, if I change to another user who is NOT listed in the backend SQL ...
4
votes
3answers
2k views

SPSecurity.RunWithElevatedPrivileges that elevates outside of the current web application context

Im not sure if this is possible without impersonating a user/service account (and therefore hard coding credentials) that has farm level access... The situation is I want to access an SPSite in ...
3
votes
5answers
2k views

RunWithElevatedPrivileges - Usage recommendations

I have a strong gut feeling that using SharePoint's RunWithElevatedPrivileges should be avoided like the plague, but need to convince some others as to exactly why. Here's what I have. Spawns a new ...