Tag Archives: Impersonation

Impersonating Current App Pool User

Using SharePoint it’s easy to run a block of code with elevated permissions: SPSecurity.RunWithElevatedPrivileges(()=> { using (SPSite elevatedSite = new SPSite(siteId)) { using (SPWeb elevatedWeb = elevatedSite.OpenWeb(wedId)) { // operations using elevated SPWeb object… } } });SPSecurity.RunWithElevatedPrivileges(()=> { using (SPSite … Continue reading

Posted in General | Tagged | Leave a comment

Impersonate SharePoint User

This is a post that I’d imagine most people who have been developing with SharePoint will be aware of but I thought it might be worthwhile blogging about. I’ve seen code where people have tried to impersonate a user to … Continue reading

Posted in SharePoint | Tagged , , | 2 Comments