Which code segment should you add at line 19?

You create a Web Part that queries a list.
The Web Part contains the following code segment. (Line numbers are included for reference only.)

You need to ensure that users without permissions to the list can view the contents of the list from the Web Part.
Which code segment should you add at line 19?
A.

B.

C. spToken = nWeb.RootWeb.AllUsers[SPContext.Current.Web.Name].UserToken;
D. spToken = nWeb.RootWeb.AllUsers[WindowsIdentity.GetCurrent().Name].UserToken;

microsoft-exams

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.