Multiple choice technology enterprise content management

Webpart required permissions that user might not have. You need to ensure that users with insufficient permissions can also run web part to perform privileged operations. Which method should you use?

  1. SPSecurity.AuthenticateMode

  2. SPSecurity.RunWithElevatedPrivileges

  3. SPSecurity.CatchAccessDeniedException

  4. SPSecurity.SetApplicationCredentialKey

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

SPSecurity.RunWithElevatedPrivileges executes the specified delegate under the context of the Sharepoint System Account (SHAREPOINT\SYSTEM), allowing users with insufficient permissions to run code that performs privileged operations. The other options do not elevate execution privileges.