Difference between RunWithElevatedPrevilage and Impersonisation

 

RunWithElevatedPrevilage

 

There are certain object model calls models that require site-administration privileges. To bypass access-denied error, we use RunWithElevatedPrivileges property when request is initiated by a no privileged user. We can successfully make calls into the object model by calling the RunWithElevatedPrivileges method provided by the SPSecurity class.For more details look at this MSDN article

http://msdn.microsoft.com/en-us/library/bb466220(office.12).aspx

Impersonation


Impersonation can basically provide the functionality of executing something in the context of a different identity, for example assigning an account to users with anonymous access. You would use impersonation in order to access resources on behalf of the user with a different account, that normally, that wouldn't be able to access or execute something.

I already have blog for impersonation please have a look at it

http://www.c-sharpcorner.com/UploadFile/Roji.Joy/2729/Default.aspx?ArticleID=4f0094b0-2690-4946-b4a1-6313e3337411

Ebook Download
View all
Learn
View all