Which line of code should you insert at line 6?
You have a web part that contains the following code segment:
01: Using site as New SPSite(“http://internet”)
02: Dim context as ServerContext = ServerContext.GetContext(site)
03: Dim profileManager as New UserProfileManager(context)
04: Dim changeQuery as New UserProfileChangeQuery()
05: changeQuery.ChangeTokenStart = New
UserProfileChangeToken(DateTimeStamp.UTCNow.Subtract(TimeSpan.FromDays(10)))
06: …
07: End Using
You need to retrieve all of the department changes for your colleagues’ profiles for the last 10 days.
Which line of code should you insert at line 6?
Which permission class should you use?
You are creating an assembly named Assembly1. Assembly1 contains a public method. The global cache contains a second assembly named Assembly2. You must ensure that the public method is only called from Assembly2.
Which permission class should you use?
Which two layers should you identify?
You are an enterprise application developer. You are creating an application that has a layered architecture as shown in the following diagram.
A component that resides in the workflow layer manages transactions across one or more activities in the business logic layer. You need to make modifications to the component. You need to identify the layers that might require modification when the component in the workflow layer is modified.
Which two layers should you identify? (Each correct answer presents part of the solution. Choose two.)
What should you do?
You develop a Web application. Your application contains two settings in the Web.config file. You deploy your application to production. You need to modify the application settings in the production environment without manually editing the XML markup in the Web.config file.
What should you do?
Which code segment should you use?
You create an audience named Sales. You need to create a custom web part that displays a control to members of the Sales audience only.
Which code segment should you use?
Which code segment should you use?
You are writing code for user authentication and authorization. The username, password, and roles are stored in your application data store. You need to establish a user security context that will be used for authorization checks such as IsInRole. You write the following code segment to authorize the user.
if (!TestPassword(userName, password))
throw new Exception(“could not authenticate user”);
String[] userRolesArray = LookupUserRoles(userName);
You need to complete this code so that it establishes the user security context.
Which code segment should you use?
Which approach should you choose?
You are an enterprise application developer. You are creating the first version of an application to manage rich text documents.
The application must meet the following design requirements:
Support the file system and a Microsoft SQL Server database as data stores.
Ensure the following for future versions:
o Add support for additional data stores, including network storage. o Acquire the ability to interface with third-party-distributed authoring and versioning tools.
Bring additional storage options online without having to redeploy the entire application. You need to identify an appropriate approach to meet these requirements. Which approach should you choose?
Which code segment should you use?
You create the following Web user control named ErrorMessages.
<%@ Control Language=”C#” AutoEventWireup=”true”
CodeFile=”ErrorMessages.ascx.cs”
Inherits=”ErrorMessages” %>
<script language=”C#” runat=”server”>
protected string m_Text = “This is a default message!”;
public string Text {
get {
return m_Text;
}
set {
m_Text = value;
}
}
</script>
The ErrorMessages control uses a public property that displays the error message. You need to change the default error message property on the Web Form in which the control is implemented.
Which code segment should you use?
Which authentication method should you specify?
You have a Microsoft Office SharePoint 2007 Server farm. You have a security policy in your companies programs that uses Single SignOn. You are creating a BDC application definition for an external business application on a SharePoint 2007 server. The external business application is accessed through a web service. The server and the business application are on different computers. Kerbrose delegation is not enabled on the domain. You need to define a line of business (LOB) systems for the external business application in the BDC application file.
Which authentication method should you specify?
Which code segment should you use?
You are developing an auditing application to display the trusted ClickOnce applications that are installed on a computer. You need the auditing application to display the origin of each trusted application.
Which code segment should you use?