Home » Microsoft » 70-573 » Which line of code should you identify?
You are creating a Web Part for SharePoint Server 2010.
The Web Part contains the following code segment. (Line numbers are included for reference only.)
You need to identify which line of code prevents the Web Part from being deployed as a sandboxed solution.
Which line of code should you identify?
A. 03
B. 04
C. 08
D. 09
Correct Answer: B
Explanation/Reference:
MNEMONIC RULE: "No RunWithElevatedPrivileges for sandboxed solutions"
Methods in a sandboxed solution cannot be configured to run with the elevated privileges of the user identity in which the application pool runs.
Restrictions on Sandboxed Solutions in SharePoint 2010
http://msdn.microsoft.com/en-us/library/gg615454.aspx