Developing Microsoft SharePoint Server 2013 Core Solutions

Topic 1, Consolidated Messenger

Background

Business Scenario

You are the lead architect, developer, and web administrator of SharePoint 2013 for your company, Consolidated Messenger. Consolidated Messenger is a national company with hundreds of franchises. Consolidated Messenger focuses on bicycle-based courier services in metropolitan areas.

Consolidated Messenger sells franchises to franchisees. Franchisees have three user types:

Technical Scenario

When a franchisee purchases a franchise, they are provided with:

Consolidated Messenger has funded the creation of three apps.

Solution Architecture

Site Collection Structure

SharePoint Farm Design

My Sites are not created for each Franchisee unless they are requested.

Business Requirements

Technical Requirements

Each Franchise site collection must include a SharePoint document library to store CSV files.

FranchiseMonitor App

Application Design

Franchise employees use Microsoft Excel 2013 to create a list of pick-up and drop-off locations for each bicycle courier for each day. The spreadsheet is named Appointments.csv.

Business Requirements

The FranchiseMonitor app must allow a Franchise employee to upload Appointments.csv to a SharePoint document library in each Franchisee site collection, and send Appointments.csv to the CloudManager app.

Technical Requirements

CourierMobile App

Application Design

Business Requirements

Technical Requirements

CloudManager App

Application Design

CloudManager processes two sets of data:

Business Requirements

The CloudManager app must implement business logic that parses Appointments.csv and geo-location data and sends Appointments or Appointment cancellations to the CourierMobile app.

Technical Requirements

Solution Code

MyClaimsProvider.cs

AppManifest.xml for Franchise Monitor app

QUESTION NO: 1

You need to ensure that the CourierMobile app determines whether the franchisee owns the account.

What should you do?

A. Use OAuth and App only security. Request the Read right from the http://sharepoint/content/ sitecollection/web/list scope URI.

B. Use OAuth and App+User security. Request the Read right from the http://sharepoint/content/ sitecollection scope URI.

C. Use SPSecurity.RunWithElevatedPrivileges to connect to SharePoint and read from the Accounts list in the site collection.

D. Use the SharePoint user credentials of the bicycle messenger to connect to SharePoint and read from the Accounts list in the site collection.

Answer: B

Explanation:

* SharePoint users three types of authorization policies. The user-only policy requires only that the call to SharePoint include an authenticated user identity. The app-only policy requires only that the call include only an authenticated app identity. The user+app policy requires that the call include both kinds of authenticated identities.

* You may have already heard that OAuth 2.0 plays an important role in the authentication and authorization of apps for SharePoint. It does, but it is not necessarily a part of the authorization story for every app for SharePoint. If you plan to build an app for SharePoint that runs in an remote web application and communicates back to SharePoint using server-side code, you will need to use OAuth.

Scenario:

* The CourierMobile app must be able to connect to the SharePoint Customers list and verify whether the account belongs to the franchisee to avoid pickups or deliveries to customers that do not belongs to the franchisee. When the CourierMobile add accesses the Customers list, it must only read its contents with the minimum permissions necessary.

* Margie's Travel provides an API to enable external developers to authenticate by using OAuth and claims-based authentication. Many couriers are members of Margie's Travel

References:

QUESTION NO: 2

A franchisee deletes several sites from the franchise's site collection. The franchisee site collection administrator must recover the sites.

You need to instruct the franchisee site collection administrator on how to access the page to recover the sites.

What should the site collection administrator do to get to the appropriate page?

A. Select General Settings for the Web Application in Central Administration and change the second stage Recycle Bin settings to 100 percent.

B. Select General Settings for the Web Application in Central Administration and change the first stage Recycle Bin settings to 0 days.

C. Select the Recycle Bin on the Site Settings page. Choose the appropriate sites and select Restore Selection.

D. Select the Recycle Bin in the Quick Launch page. Choose the appropriate sites and select Restore Selection.

Answer: D

Explanation:

To restore a deleted site or workspace directly from the Site Collection Recycle Bin:

1. Click Recycle Bin on the Quick Launch.

2. On the Site Name Recycle Bin page, above the list of deleted objects, click the Site Collection Recycle Binlink.

3. On the Site Collection Administration Recycle Bin page, under Select a View, make sure that Deleted from end user Recycle Bin is selected.

4. Locate the site or workspace that you want to restore.

5. Select the check box next to the site or workspace that you want to restore, and then click Restore Selection.

Incorrect:

Not A, not B: The sites have been deleted. They need to be restored. A and B are wrong because modifying the Recycle Bin settings after the sites are deleted will have no effect on the deleted sites.

References:

QUESTION NO: 3

You need to ensure that the CloudManager app can write route progress check-ins to the courier's microfeed.

What should you do? (Each correct answer presents part of the solution. Choose all that apply.)

A. Ensure that SP.RequestExecutor.js can be accessed in a browser window with no errors.

B. Ensure that the CloudManager app has the Manage permission request scoped to the URL for the franchisee's My Site.

C. Ensure that the MySite host is provisioned for each franchisee.

D. Ensure that all cookies are made available between the My Site and the CloudManager app domain.

E. Ensure that the CloudManager app has the Write permission request scoped to the URL for the franchisee's My Site.

F. Ensure that SP.UserProfiles.js can be accessed in a browser window with no errors.

Answer: A,B,D,E

Explanation:

* From scenario:

/ Business Requirements

The FranchiseMonitor app must allow a Franchise employee to upload Appointments.csv to a SharePoint document library in each Franchisee site collection, and send Appointments.csv to the CloudManager app.

/ The FranchiseMonitor app must display the courier's location on the bicycle courier's microfeed on the SharePoint farm if the courier has remained stationary for more than three minutes.

/ The CloudManager app must implement business logic that parses Appointments.csv and geo-location data and sends Appointments or Appointment cancellations to the CourierMobile app.

QUESTION NO: 4 DRAG DROP

Some franchisees want to launch the FranchiseMonitor app from a link named Launch Franchise Monitor that is displayed next to the name of the user who is currently logged in. Other franchisees do not want to have the link present. The link must be contained within the same out-of-the-box control, as shown in the screenshot below:

You need to configure support for the Launch Franchise Monitor link.

Which four actions should you perform in sequence? (To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.)

Answer: <map><m x1=4 x2=297 y1=46 y2=104/><m x1=6 x2=296 y1=113 y2=187/><m x1=7 x2=292 y1=194 y2=253/><m x1=6 x2=296 y1=265 y2=321/><m x1=4 x2=296 y1=333 y2=389/><m x1=6 x2=294 y1=401 y2=455/><m x1=6 x2=297 y1=471 y2=557/><m x1=7 x2=298 y1=567 y2=629/><m x1=310 x2=625 y1=40 y2=142/><m x1=308 x2=626 y1=155 y2=257/><m x1=311 x2=627 y1=270 y2=384/><m x1=311 x2=624 y1=398 y2=526/></map>

Explanation:

Box 1:

Box 2:

Box 3:

Box 4:

Note:

Box 1 (see box 4): Empty elements are most often used to define SharePoint project items that lack a project or project item template in Visual Studio. When you add an empty element to your project, a node named EmptyElement[x] (where [x] is a unique number) is created. EmptyElement[x] contains a single file that is named Elements.xml. Use XML statements to define the desired elements in Elements.xml.

Box 2: SuiteLinksDelegate delegate control allow us to add links in right suite bar like "Newsfeed","Sites" etc.

Box 3: User Control Code Behind:

protected override void Render(HtmlTextWriter writer) etc.

Box 4: For all these delegate controls , you need to add a reference in Elements.xml file to specify the control id and control source properties:

<?xml version="1.0" encoding="utf-8"?>

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">

<Control ControlSrc="/_controltemplates/15/MyDelegateControls/UserControl.ascx"

Id="DelegateControlID" //ID of DelegateControl e.g. "SuiteLinksDelegate"

Sequence="1" />

</Elements>

References:

QUESTION NO: 5

You need to implement the custom claims provider for the SharePoint farm.

Which code segments should you implement? (Each correct answer presents part of the solution. Choose all that apply.)

A. Option A

B. Option B

C. Option C

D. Option D

E. Option E

F. Option F

Answer: B,D,F

Explanation:

The following are required methods when writing a claims provider.

B: Required for claims picker

Claims can be displayed in the people picker control through claims picking. The following methods in the SPClaimProvider class are required methods if you want to implement claim picking in the people picker control.

protected abstract void FillSchema(SPProviderSchema schema);

protected abstract void FillClaimTypes(List<String> claimTypes);

protected abstract void FillClaimValueTypes(List<String> claimValueTypes);

protected abstract void FillEntityTypes(List<String> entityTypes);

D: Required for resolving claims in the type-in control of the claims picker

If you want to be able to resolve claims by using the type-in control of the claims picker, you must implement the following methods in the SPClaimProvider class.

public abstract bool SupportsResolve

protected abstract void FillResolve(Uri context, String[] entityTypes, String resolveInput, List<PickerEntity> resolved);

protected abstract void FillResolve(Uri context, String[]

F: Required for searching for claims in the claims picker

If you want to be able to search for claims in the claims picker, you must implement the following property and method in the SPClaimProvider class.

public abstract bool SupportsSearch

protected abstract void FillSearch(Uri context, String[] entit

* From scenario:

MyClaimsProvider.es

References:

QUESTION NO: 6

You need to set the appropriate permissions for the franchise employees' customer list and customer subsite access.

What should you do?

A. Add franchise employees to the Members group in the CorporateSiteCollection site collection. Break inheritance at the franchisee subsite level. Create a custom role definition at the franchisee subsite level. Add franchise employees to the custom role.

B. Create a custom role definition in the CorporateSiteCollection site collection with Limited Access to the Customers list. Add franchise employees to the custom role at the CorporateSiteCollection site collection. Break inheritance at the subsite level. Add franchise owners to the Owners group at the subsite level.

C. Create a custom role definition in the CorporateSiteCollection site collection with Limited Access to the Customer list. Add franchise employees to the custom role. Allow full inheritance of the role definition and permissions at the site level.

D. Add franchise employees to the Visitors group in the CorporateSiteCollection site collection. Break inheritance at the franchisee subsite level. Create a custom role definition at the subsite level with Full Control permissions. Add franchise employees to the custom role.

Answer: B

Explanation:

QUESTION NO: 7

You need to create rules in the CourierMobile app based on the ItemType that arrives.

For which ItemTypes should you test? (Each correct answer presents part of the solution. Choose all that apply.)

A. IPM.Schedule.Meeting.Tent

B. IPM.Note

C. IPM.Schedule.Meeting.Request

D. IPM.Appointment

E. IPM.Schedule.Meeting.Cancelled

F. IPM.Schedule.Meeting.Pos

G. IPM.Schedule.Meeting.Neg

Answer: D,E

Explanation:

From scenario:

* The CourierMobile app receives Microsoft Outlook appointments (D) and Outlook appointment cancellations (E) from the CloudManager app. The appointments include the address of the location for pick-up or drop-off.

QUESTION NO: 8

You need to meet the requirements for data storage for the CourierMobile app and the CloudMananger app.

Which technologies should you use? (Each correct answer presents part of the solution. Choose all that apply.)

A. Windows Azure SQL Database

B. SharePoint content database

C. Secure Store

D. SQL Server Express LocalDB

E. SharePoint list

Answer: A,D

Explanation:

A: SQL Azure in the cloud.

D: LocalDB is a lightweight version of Express that has the same programmability features, but it runs in user mode and has a fast, zero-configuration installation and a short list of prerequisites.

From scenario:

* CourierMobile App

The CourierMobile app must be able to capture more than 30 million data points of location data daily as they occur and upload the location data to the cloud when connected to the Internet.

* Cloudmanager App

/ The CloudManager app must elastically scale to capture courier location data as the number of bicycle couriers increases or decreases.

/ The CloudManager app must process bicycle courier location data from a data store capable of storing more than 30 million items.

QUESTION NO: 9 HOTSPOT

You need to select the app experience for the CourierMobile app.

In the App for Office 2013 dialog window, which configuration option should you select? (To answer, select the appropriate configuration option in the answer area.)

Answer: <map><m x1=54 x2=293 y1=300 y2=334/></map>

Explanation:

Scenario: The CourierMobile app receives Microsoft Outlook appointments and Outlook appointment cancellations from the CloudManager app. The appointments include the address of the location for pick-up or drop-off.

QUESTION NO: 10

You need to create a custom sign-in page to allow the users of the FranchiseMonitor app to authenticate against SharePoint and Margie's Travel API.

What should you do?

A. Create an app for SharePoint. Set the trust level to Sandbox solution. Create an application page that writes a cookie named FedAuth. Deploy the app and configure the Sign In Page URL in Central Administration Authentication Provider for the zone.

B. Create an app for SharePoint. Set the trust level to Farm solution. Create an application page that writes a cookie named FedAuth. Deploy the app and configure the Sign In Page URL in Central Administration Authentication Provider for the zone.

C. Create an app for SharePoint. Set the trust level to Farm solution. Create an application page that writes a cookie named ASPXAUTH. Deploy the app and configure the Sign In Page URL in Central Administration Authentication Provider for the zone.

D. Create an app for SharePoint. Set the trust level to Sandbox solution. Create an application page that writes a cookie named ASPXAUTH. Deploy the app and configure the Sign In Page URL in Central Administration Authentication Provider for the zone.

Answer: B

Explanation:

The new claims-based authentication in SharePoint 2010 does not use the ASPXAUTH cookie, instead it uses the FedAuth cookie.

SharePoint 2013 tracks FedAuth cookies in the new distributed cache service using Windows Server AppFabric Caching.

Scenario: The FranchiseMonitor app must use claims-based authentication, once launched, to authenticate the franchisee against an API provided by Margie's Travel.

QUESTION NO: 11 HOTSPOT

You need to design the FranchiseMonitor app to meet the requirements.

What should you do? (To answer, select the appropriate option from each drop-down list in the answer area.)

Answer: <map><m x1=315 x2=473 y1=47 y2=63/><m x1=366 x2=500 y1=136 y2=154/></map>

Explanation:

Box 1: App for SharePoint 2013

Scenario:

The FranchiseMonitor app must allow a Franchise employee to upload Appointments.csv to a SharePoint document library in each Franchisee site collection, and send Appointments.csv to the CloudManager app.

The FranchiseMonitor app must be able to create lists within SharePoint to store records of the CSV files so that they may be sent to the CloudManager app.

Box 2: Immersive Full Page

Scenario: The FranchiseMonitor app must display the courier's location on the bicycle courier's microfeed on the SharePoint farm if the courier has remained stationary for more than three minutes.

* Immersive (or full-page app): This shape provides a fully immersive experience by using the entire page. While this gives you complete control over the app experience, it is important to make sure that your app properly links back to the SharePoint site, so the user experience feels integrated and not lost. To make this simple, we provide a chrome control that not only lets your app automatically point a user back to their SharePoint environment, but it also provides your app with the current SharePoint cascading style sheet (CSS). So when SharePoint changes its CSS, say, through a theming change, your app will change its look and feel as well.

References:

QUESTION NO: 12 HOTSPOT

You need to design the CloudManager app to meet the requirements.

What should you do? (To answer, select the appropriate option from each drop-down list in the answer area.)

Answer: <map><m x1=264 x2=411 y1=70 y2=84/><m x1=320 x2=436 y1=159 y2=173/></map>

Explanation:

Box 1: App for SharePoint 2013

Box 2: Immersive Full Page

* Immersive (or full-page app): This shape provides a fully immersive experience by using the entire page. While this gives you complete control over the app experience, it is important to make sure that your app properly links back to the SharePoint site, so the user experience feels integrated and not lost. To make this simple, we provide a chrome control that not only lets your app automatically point a user back to their SharePoint environment, but it also provides your app with the current SharePoint cascading style sheet (CSS). So when SharePoint changes its CSS, say, through a theming change, your app will change its look and feel as well.

References:

QUESTION NO: 13 HOTSPOT

You need to add markup at line AM10 to set the minimum app permissions for the FranchiseMonitor app.

Which code segments should you include in Target 1 and Target 2 to complete the code? (To answer, select the appropriate options from each drop-down list in the answer area.)

Answer: <map><m x1=75 x2=312 y1=78 y2=92/><m x1=80 x2=128 y1=167 y2=182/></map>

Explanation:

URL: Sharepoint/content/sitecollection/web

The website where the app is installed. Includes all children of this scope.

Scenario: The FranchiseMonitor app must be able to create lists within SharePoint to store records of the CSV files so that they may be sent to the CloudManager app.

Incorrect:

URL: http://sharepoint/content/tenant

The tenancy where the app is installed. Includes all children of this scope.

URL: http://sharepoint/content/sitecollection/web/list

All the lists in the website where the app is installed. Includes all children of this scope.

QUESTION NO: 14 HOTSPOT

You need to replace the markup at lines AM17 through line AM20 to set the minimum app permissions for the FranchiseMonitor app.

Which markup segments should you include in Target 1 and Target 2 to complete the markup? To answer, select the appropriate options from each drop-down list in the answer area.

Answer: <map><m x1=258 x2=516 y1=166 y2=180/><m x1=256 x2=293 y1=229 y2=241/></map>

Explanation:

Scenario:

* The FranchiseMonitor app must allow a Franchise employee to upload Appointments.csv to a SharePoint document library in each Franchisee site collection, and send Appointments.csv to the CloudManager app.

* The FranchiseMonitor app must be able to create lists within SharePoint to store records of the CSV files so that they may be sent to the CloudManager app.

Topic 2, SharePoint

A client asks you to create a basic task tracking app for SharePoint. The app will be hosted remotely. The users will be able to set up task lists, mark tasks as completed, and manage their task lists.

Business Requirements

The client specifies the following business requirements:

Existing Site Configuration

The table below shows the current site configuration for the client's SharePoint site.

Task List Design

The app should create a SharePoint list named Tasks with the following attributes:

User Groups

SharePoint groups will be used to manage access to features of the app.

Task Display

The app should retrieve the Tasks list and display the contents on a webpage 20 tasks at a time.

Technical Requirements

You have the following requirements:

Pending Issues

When you deploy the app from Visual Studio 2012, you receive the error: "Error occurred in deployment step 'Install app for SharePoint': Sideloading of apps is not enabled on this site."

Application Structure

Relevant portions of the app files are shown below. (Line numbers in the code segments are included for reference only and include a two-character prefix that denotes the specific file to which they belong.)

LicenseValidation.cs

SystemMessage.cs

ImpIementTaskList.cs

RetrieveTaskList.cs

CanDeleteTask.cs

TermSet Navigation.cs

QUESTION NO: 15

You need to configure the credential store for the app.

Which properties should you configure? (Each correct answer presents part of the solution. Choose all that apply.)

A. Pin

B. Windows Password

C. Windows User Name

D. Password

E. User Name

Answer: D,E

Explanation:

From scenario:

* A client asks you to create a basic task tracking app for SharePoint. The app will be hosted remotely

* Remote users will authenticate to the app by using a username and password.

QUESTION NO: 16

You need to deploy the package.

Which file should you select?

A. the file ending in .publish

B. the file ending in .wsp

C. the file ending in .dll

D. the file ending in .app

Answer: D

Explanation:

To publish your app for SharePoint, upload the app manifest file (.app) of your app to the Office Store, the Apps for Office catalog, SharePoint, a file share, or the Exchange catalog.

Scenario: When completed, the app will be published to the Microsoft Store as a paid app.

References:

QUESTION NO: 17 DRAG DROP

You need add to code at line IL22 to implement the task list design.

How should you complete the relevant code? (To answer, drag the appropriate code segments to the correct location or locations in the answer area. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)

Answer: <map><m x1=7 x2=183 y1=62 y2=84/><m x1=6 x2=182 y1=95 y2=117/><m x1=7 x2=176 y1=130 y2=153/><m x1=7 x2=183 y1=162 y2=185/><m x1=6 x2=181 y1=197 y2=223/><m x1=4 x2=184 y1=229 y2=254/><m x1=6 x2=182 y1=262 y2=288/><m x1=4 x2=183 y1=297 y2=320/><m x1=301 x2=481 y1=113 y2=140/><m x1=398 x2=574 y1=278 y2=306/><m x1=414 x2=593 y1=319 y2=345/></map>

Explanation:

Scenario: Tasks can be tagged with the programming language being used. Task list items may be tagged only with the following terms: C++, C#, and JavaScript.

QUESTION NO: 18

You receive an error when you deploy the app.

You need to resolve the error.

What should you do?

A. Deploy the app to http://contoso-public.sharepoint.com.

B. Enable side-loading of apps in the Visual Studio project properties.

C. Deploy the app to https://contoso-my.sharepoint.com.

D. Deploy the app to https://contoso.sharepoint.com/tasks.

Answer: D

Explanation:

We should deploy the app to the Development site, that is https://contoso.sharepoint.com/tasks (see Existing Site Configuration in scenario).

Note:

* Loading Apps directly from Visual Studio only works if the destination is a Developer site. That form of distribution, called side loading, is only used when testing and debugging an App. To load an App in a regular site you need to add the .App package produced in Visual to the App Catalog site that is associated with your Web Application. From there you will be able to load the app using the Site Contents link in your site.

* Issue: While we try creating a SharePoint 2013 App in a SharePoint hosted model and when we try to deploy the solution, we get an “Error occurred in deployment step ‘Install app for SharePoint’: Side loading of apps is not enabled on this site.

Solution:

1. That is, while creating a site collection/site where you want to deploy the app, create it using the “Developer Site” template under the Collaboration tab.

2. Always the app should be published/deployed to the developer site (A site collection with the Developer Site Template). And from this developer site you can add the App to your SharePoint site

Scenario: Pending Issues

When you deploy the app from Visual Studio 2012, you receive the error: "Error occurred in de-ployment step 'Install app for SharePoint': Sideloading of apps is not enabled on this site."

References:

QUESTION NO: 19

You need to implement term set navigation.

Which code segment should you insert at line TN16?

A. Option A

B. Option B

C. Option C

D. Option D

Answer: A

Explanation:

* A well-designed navigation tells your site's users a lot about the business, products, and services that the website offers. By updating the taxonomy behind the navigation, businesses can drive and keep up with change without having to recreate their site navigation in the process.

* GlobalNavigationToxonomyProvider

StandardNavigationProviderNames.GlobalNavigationTaxonomyProvider field

The TaxonomySiteMapProvider instance used for the global navigation scheme.

The menu for the “global navigation” scheme typically appears at the top of the master page.

Scenario: Navigational links across the top should be driven by the term store and use URLs that will improve search engine ranking.

Incorrect:

Not C: StandardNavigationProviderNames.CurrentNavigationTaxonomyProvider field

The menu for the “current navigation” scheme typically appears on the left side of the master page.

References:

QUESTION NO: 20

You need to validate that specific users can delete tasks.

Which code segment should you insert at line CD04?

A. Option A

B. Option B

C. Option C

D. Option D

Answer: D

Explanation:

Retrieving all users from a SharePoint group

The SiteGroups property of the Web class gets all groups in all Web sites within a site collection.

Example:

ClientContext clientContext = new ClientContext("http://MyServer/sites/MySiteCollection");

GroupCollection collGroup = clientContext.Web.SiteGroups;

Scenario: Project leads can remove task lists.

References:

QUESTION NO: 21

You need to implement term set navigation.

Which code segment should you insert at line TN24?

A. Option A

B. Option B

C. Option C

D. Option D

Answer: D

Explanation:

Managed Navigation allows for “friendly” URLs. These friendly URLs no longer contain the “Pages/” folder.

References:

QUESTION NO: 22

You need to complete the code at line LV19 to implement the validation of the app license.

Which code segment should you use?

A. Option A

B. Option B

C. Option C

D. Option D

Answer: C

Explanation:

Scenario: Only users with a paid license can use the app.

QUESTION NO: 23

You receive an error when you deploy the app.

You need to resolve the error.

What should you do?

A. Create a deployment package and upload the app to the app catalog in SharePoint.

B. Enable side-loading of apps in the app manifest.

C. Deploy the app to https://contoso-my.sharepoint.com.

D. Enable side-loading of apps in the Visual Studio project properties.

Answer: A

Explanation:

We should deploy the app to the Development site, that is https://contoso.sharepoint.com/tasks (see Existing Site Configuration in scenario).

Note:

* Loading Apps directly from Visual Studio only works if the destination is a Developer site. That form of distribution, called side loading, is only used when testing and debugging an App. To load an App in a regular site you need to add the .App package produced in Visual to the App Catalog site that is associated with your Web Application. From there you will be able to load the app using the Site Contents link in your site.

* Issue: While we try creating a SharePoint 2013 App in a SharePoint hosted model and when we try to deploy the solution, we get an “Error occurred in deployment step ‘Install app for SharePoint’: Side loading of apps is not enabled on this site.

Solution:

1. That is, while creating a site collection/site where you want to deploy the app, create it using the “Developer Site” template under the Collaboration tab.

2. Always the app should be published/deployed to the developer site (A site collection with the Developer Site Template). And from this developer site you can add the App to your SharePoint site

Scenario: Pending Issues

When you deploy the app from Visual Studio 2012, you receive the error: "Error occurred in de-ployment step 'Install app for SharePoint': Sideloading of apps is not enabled on this site."

References:

QUESTION NO: 24

You need to configure navigation for the site.

What should you do? (Each correct answer presents part of the solution. Choose all that apply.)

A. Create simple links or headers for new pages.

B. Create friendly URLs for new pages automatically.

C. Add unique identifiers to new pages.

D. Create term-driven pages with friendly URLs.

E. Add new pages to navigation automatically.

Answer: A,B,D

Explanation:

D: Scenario: Navigational links across the top should be driven by the term store and use URLs that will improve search engine ranking.

A: Simple links:

The HR node is configured with a link to a page the user will be taken to when clicking on the menu item:

BD: Enable Managed Navigation

This page allows you to select managed navigation for your global and current navigation.

Under Site Settings / Look and Feel click on Navigation.

Other settings on this page allow you to define the term set that will be used for navigation terms and if new pages created should be added to the term set automatically. You can also specify if friendly URL's should be created automatically.

References:

QUESTION NO: 25

You receive an error when you deploy the app.

You need to resolve the error.

What should you do?

A. Deploy the app to https://contoso.sharepoint.com/tasks.

B. Deploy the app to https://contoso-my.sharepoint.com.

C. Enable side-loading of apps in the Visual Studio project properties.

D. Enable side-loading of apps in the app manifest.

Answer: D

Explanation:

* Scenario: Pending Issues

When you deploy the app from Visual Studio 2012, you receive the error: "Error occurred in deployment step 'Install app for SharePoint': Sideloading of apps is not enabled on this site."

QUESTION NO: 26 DRAG DROP

You need add to code at line IL22 to implement the task list design.

You have the following code:

Which code segment should you include in Target 1, Target 2 and Target 3 to complete the code? (To answer, drag the appropriate code segments to the correct targets in the answer area. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)

Answer: <map><m x1=13 x2=181 y1=34 y2=62/><m x1=14 x2=181 y1=118 y2=143/><m x1=16 x2=180 y1=157 y2=186/><m x1=20 x2=180 y1=196 y2=225/><m x1=17 x2=180 y1=275 y2=305/><m x1=14 x2=182 y1=318 y2=345/><m x1=424 x2=586 y1=106 y2=136/><m x1=421 x2=587 y1=30 y2=62/><m x1=425 x2=589 y1=69 y2=99/><m x1=18 x2=180 y1=76 y2=103/><m x1=12 x2=181 y1=236 y2=266/></map>

Explanation:

Box 1: Choice

Box 2: RadioButtons

Box 3: "Yes", "No"

Note:

* ChoiceFormatType enumeration members are Dropdown (A drop-down list box) and RadioButtons (Option buttons (also known as radio buttons).

* Scenario: The users will be able to set up task lists, mark tasks as completed, and manage their task lists.

Topic 3, Coho Winery

Background

Coho Winery implements a SharePoint farm. They have an intranet site for company employees and an extranet site for their customers. Coho Winery sells products to wholesale and retail customers. Customers must be able to order specific brands and pay directly.

Business Requirements

Site Collection

The company must organize its main enterprise site to have multiple site collections for different wine brands from various regions. Site documents must have a consistent look and feel.

New Features

The first version (1.0.0.0) of the feature must support the addition of newer functionality when the feature is upgraded to version 1.5.0.0.

Technical Requirements

General

User Authorization

Application Lifecycle Management

Backup and Recovery

Performance Optimization and Memory Usage

SPSite objects must be removed from memory immediately after the objects go out of scope.

Automation

Windows PowerShell must be used to automate all operations wherever possible.

Application Structure

Relevant portions of the application files are shown below. (Line numbers in the code segments are included for reference only and include a two-character prefix that denotes the specific file to which they belong.)

ContentType.cs

UserAuthorization.cs

ContentType.Finance.Template.xml

ExportWholesaleSites.ps1

QUESTION NO: 27

A server in the SharePoint farm experiences high memory usage. Task Scheduler on the server runs a Windows PowerShell script to perform backups of Wholesale sites.

You need to resolve any memory leak issues in the Windows PowerShell script.

What should you do? (Each correct answer presents a complete solution. Choose all that apply.)

A. Insert the code segment at line EW04: Start-SPAssignment -Global

B. Insert the code segment at line EW17:$site.Close()

C. Insert the code segment at line EW17:Stop-SPAssignment -SemiGlobal

D. Insert the code segment at line EW17:Stop-SPAssignment –Global

Answer: A,C

Explanation:

* Start-SPAssignment –Global initiates a new assignment store.

* Stop-SPAssignment .Disposes of objects in the provided assignment collection.

The Stop-SPAssignmentcmdlet disposes of objects in the provided assignment collection. Use the Global parameter to dispose of all objects in the global assignment collector and to stop the global store from collecting additional objects. Provide a SemiGlobal assignment collector to dispose of all contained objects.

From scenario:

* Performance Optimization and Memory Usage

SPSite objects must be removed from memory immediately after the objects go out of scope.

QUESTION NO: 28 DRAG DROP

You need to add code at line UA09 to create the custom role.

How should you complete the relevant code? (To answer, select the appropriate code segment from each drop-down list in the answer area.)

Answer: <map><m x1=163 x2=272 y1=28 y2=47/><m x1=10 x2=245 y1=170 y2=189/><m x1=7 x2=99 y1=262 y2=279/></map>

Explanation:

* SPRoleDefinition

The role definition, or permission level, is the list of rights associated with the role. For example, a user with the Read role can browse pages in the Web site and view items in lists. A role definition is a collection of rights bound to a specific object. Role definitions (for example, Full Control, Read, Contribute, Design, or Limited Access) are scoped to the Web site.

* SPWeb.Update

Scenario: User Authorization

A custom role named Wholesale must be created. Wholesale customers must be assigned to this role in order to view the promotions page.

Incorrect:

Not RoleDefinitionCollection: SPWeb does not have a member RoleDefinitionCollection.

Not web.Commit(): SPWeb does not have a method Commit().

Not web.AddProperty(CustomRole,_permissions)

Just need to create the role, not add permissions.

References:

QUESTION NO: 29

After deploying a solution, a code-based hotfix becomes available.

You need to deploy the hotfix.

What should you do? (Each correct answer presents part of the solution. Choose all that apply.)

A. Use assembly binding redirection in the web application configuration file.

B. Increment the assembly file version of the assembly.

C. Increment the product version of the assembly.

D. Increment the assembly version of the assembly.

E. Use assembly binding redirection in the assembly policy file.

Answer: A,C

Explanation:

A:Assembly versions are everywhere in SharePoint – web.config files, web part definitions, workflow definitions, event receiver bindings – the list goes on. In each case, the version number is absolutely required so that SharePoint can load the code to run at that time. If you update an assembly’s version, you have two choices to ensure your code can still be loaded:

/ Find and update every reference to the previous assembly version.

/ Use a binding redirect in the relevant .config file (e.g. web.config) to point to the new version of the assembly.

C: Assembly Version : This is the version number used by framework during build and at runtime to locate, link and load the assemblies. When you add reference to any assembly in your project, it is this version number which gets embedded. At runtime, CLR looks for assembly with this version number to load. But remember this version is used along with name, public key token and culture information only if the assemblies are strong-named signed. If assemblies are not strong-named signed, only file names are used for loading.

Incorrect:

not B: Assembly File Version : This is the version number given to file as in file system. It is displayed by Windows Explorer. It’s never used by .NET framework or runtime for referencing.

From scenario:

* solution artifacts must adhere to industry best practices.

* Code based hot fixes must be deployed directly to the Global Assembly Cache on all SharePoint servers.

* Only one version of an assembly must be available at runtime.

QUESTION NO: 30 DRAG DROP

You need to add code at line CT11 to create the content types.

How should you complete the relevant code? (To answer, drag the appropriate code segments to the correct location or locations in the answer area. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)

Answer: <map><m x1=4 x2=392 y1=53 y2=92/><m x1=7 x2=396 y1=106 y2=148/><m x1=7 x2=393 y1=154 y2=204/><m x1=3 x2=394 y1=213 y2=254/><m x1=6 x2=391 y1=265 y2=305/><m x1=6 x2=393 y1=316 y2=355/><m x1=6 x2=393 y1=370 y2=411/><m x1=427 x2=812 y1=76 y2=128/><m x1=428 x2=815 y1=159 y2=204/><m x1=425 x2=813 y1=238 y2=283/></map>

Explanation:

docContentType1 is the Finance. The Order Details and Payment Confirmation types must refer to docContentType1.

Scenario:

* A Document content type named Finance must be created at the site level. It must contain two site columns

* The Order Details and Payment Confirmation content types must be derived from the Finance content type.

QUESTION NO: 31 HOTSPOT

You need to create the required site columns.

How should you complete the relevant code? (To answer, select the appropriate code segment from each drop-down list in the answer area.)

Answer: <map><m x1=3 x2=195 y1=147 y2=165/><m x1=29 x2=319 y1=213 y2=236/><m x1=273 x2=350 y1=350 y2=369/></map>

Explanation:

* GetFieldByInternalName

The GetFieldByInternalName method of the SPFieldCollection class returns the field with the specified internal name from the collection.

* SPFieldText.Group

Scenario: A Document content type named Finance must be created at the site level. It must contain two site columns named Customer Name and Transaction Date.

QUESTION NO: 32

Customers report that upon creation of the Payment Confirmation document, they do not receive a confirmation message.

You need to ensure that customers receive confirmation messages.

What should you do?

A. Ensure that the user has the correct permissions to start a workflow.

B. Ensure that the Payment Confirmation content type is deployed.

C. Ensure that the user is assigned to the Wholesale role.

D. Ensure that a workflow is associated with the document content type.

Answer: D

Explanation:

Scenario:

Workflows associated with document content types must be initiated when documents are generated

When Payment Confirmation documents are generated, a workflow must send a notification to the customer by email.

QUESTION NO: 33

You need to set the appropriate permission levels.

A variable named customRole references Wholesale.

Which code segment should you add at line UA09?

A. customRole.BasePermissions = _permissions | SPBasePermissions.ViewFormPages;

B. customRole.BasePermissions = _permissions | SPBasePermissions.ViewPages;

C. customRole.BasePermissions = SPBasePermissions.EmptyMask | SPBasePermissions.ViewPages;

D. customRole.BasePermissions = SPBasePermissions.ViewPages;

Answer: B

Explanation:

Add the ViewPages permission to the permissions of the variable _permissions.

Scenario: User Authorization

A custom role named Wholesale must be created. Wholesale customers must be assigned to this role in order to view the promotions page.

QUESTION NO: 34

You must upgrade the existing version of the application to a newer version.

Which two actions should you perform? (Each correct answer presents part of the solution. Choose all that apply.)

A. Add the following code segment at line CX11:<VersionRangeBeginVersion="1.0" EndVersion="2.e">

B. Add the following code segment at CX13:<VersionRange BeginVersion-"1.0.0.0"EndVersion-"2.0.0.0">

C. Use Microsoft Visual Studio to change the feature version to 1.5.0.0.

D. Use Microsoft Visual Studio to change the feature version to 1.5.

E. Add the following code segment at line CX11:<VersionRange BeginVersion-"1.0.0.0"EndVersion-"2.0.0.0">

Answer: B,C

Explanation:

B: VersionRange Element specifies a range of previous versions of the Feature to which the upgrade actions should apply.

/ BeginVersion: Specifies the earliest version number to which the child upgrade elements will apply, in the format n.n.n.n, where each n can be up to four digits.

/ EndVersion: Specifies the earliest version number to which the upgrade will not apply. The format is n.n.n.n, where each n can be up to four digits.

C: Feature versions in Microsoft SharePoint Foundation are used to trigger Feature upgrade. If you update your Feature version but do not specify any Feature upgrade logic in the Feature.xml file, when the Feature upgrade runs, it simply updates the version number of your Feature. However, if you specify Feature upgrade logic, the upgrade code is executed and the version number is automatically updated as well.

Scenario: New Features

The first version (1.0.0.0) of the feature must support the addition of newer functionality when the feature is upgraded to version 1.5.0.0.

References:

QUESTION NO: 35 HOTSPOT

You need to add code at line UA11 to create the custom role.

You have the following code:

Which code segments should you include in Target 1, Target 2 and Target 3 to complete the code? (To answer, select the appropriate code segment from each drop-down list in the answer area.)

Answer: <map><m x1=85 x2=184 y1=64 y2=80/><m x1=86 x2=284 y1=177 y2=187/><m x1=86 x2=162 y1=264 y2=279/></map>

Explanation:

* SPRoleDefinition

The role definition, or permission level, is the list of rights associated with the role. For example, a user with the Read role can browse pages in the Web site and view items in lists. A role definition is a collection of rights bound to a specific object. Role definitions (for example, Full Control, Read, Contribute, Design, or Limited Access) are scoped to the Web site.

* SPWeb.Update

Scenario: User Authorization

A custom role named Wholesale must be created. Wholesale customers must be assigned to this role in order to view the promotions page.

Incorrect:

Not RoleDefinitionCollection: SPWeb does not have a member RoleDefinitionCollection.

Not web.Commit(): SPWeb does not have a method Commit().

Not web.AddProperty(CustomRole,_permissions)

Just need to create the role, not add permissions.

References:

QUESTION NO: 36

You need to automate the backup of a site collection.

What should you do? (Each correct answer presents part of the solution. Choose all that apply.)

A. Back up to a network folder.

B. Set the LockStatus of the site collection to Adding content prevented

C. Back up to a local folder and then move the backup to a network folder.

D. Use Central Administration to perform the backup.

E. Use Windows PowerShell to perform the backup.

Answer: C,E

Explanation:

C: For better performance, Microsoft recommends that you back up to the local computer and then move the backup files to a network folder.

E (not D):

Scenario: Automation: Windows PowerShell must be used to automate all operations wherever possible.

Scenario: Backup and Recovery

* In the event of hardware failure, the SharePoint environment must be restored to the most recent date.

* The backup process must not degrade system performance.

* Automation: Windows PowerShell must be used to automate all operations wherever possible.

References:

QUESTION NO: 37

You need to set the appropriate permission levels. A variable named customRole references Wholesale.

Which code segment should you add at line UA11?

A. customRole.BasePermissions = SPBasePermissions.ViewPages;

B. customRole.BasePermissions = _permissions | SPBasePermissions.ViewFormPages;

C. customRole.BasePermissions = SPBasePermissions.EmptyMask | SPBasePermissions.ViewPages;

D. customRole.BasePermissions = _permissions | SPBasePermissions.ViewPages;

Answer: D

Explanation:

* ViewPages, View pages in a Web site.

* Scenario: A custom role named Wholesale must be created. Wholesale customers must be assigned to this role in order to view the promotions page.

Incorrect:

Not A, not C: The previous line, UA10, is: _permissions = this.GetExistingPermissions();

We should add this permission and the ViewPages permission.

Not B: ViewFormPagesView forms, views, and application pages, and enumerate lists.

References:

Topic 4, LitwareInc

Background

You are a SharePoint developer working for Litware Inc., a large bicycle manufacturing company. Litware runs an intranet that is based on SharePoint Server 2010, side-by-side with a collaboration space for various departments. The IT department for Litware is migrating a SharePoint 2010 environment to a new SharePoint 2013 farm. Some collaboration site collections are already migrated, including a Marketing site collection. Some of the intranet content must be migrated to the target platform; however, the whole intranet won’t be migrated as-is.

Business Requirements

Intranet

Litware is redefining its brand identity. It is essential that the new intranet supports a wide variety of mobile devices, platforms, and browsers. Some of the content must be migrated from the old intranet during the implementation. The redesigned intranet must be extensible. The solution must be designed with the changes in the underlying technology in mind.

A marketing company named Graphic Design Institute provides documents and guidelines for the new design for Litware's intranet.

Collaboration

Litware has the following collaboration requirements:

Marketing collaboration space

Auditors must be able to create reports about the documents the Marketing team produces. Initial reports should show document distribution over projects and information about the most active documents, the top inactive documents, and the most active users. Additional reports will be added over time.

Technical Requirements

Publishing Design for the Intranet

Litware will use the following web application for the intranet: https://intranet.litwareinc.com.

The publishing site design is delivered as a set of HTML files (litwarepublishing.html), CSS (Litwarepublishing.css), and image files from the marketing company. A design package must be created for easier deployment over various platforms. During the creation and application of the design package to the publishing site, SharePoint 2013 out-of-the-box capabilities must be used as much as possible to ensure simple design changes and to ease the upgrade procedures. The publishing site must support rendering on a number of devices, starting with Windows Phone 7. Apart from being deployed on all existing publishing sites, the design package must be automatically deployed each time a publishing site is created. A search box must be available on all pages.

Collaboration

Litware will use two additional web applications for the collaboration:

Most of the features contained within the Team Site template are sufficient; however, a few additions to the template must be made to support the business requirements. In order to achieve this and ensure maximum portability, a web template based on the Team Site site definition must be created. A three-state workflow must be used to manage business processes. A customized default home page must be deployed by using a site feature.

Feature IDs:

The project must be implemented in phases, so a solution must be developed to support upgrade procedures. As soon as the package containing the web template Litware.Intranet.Templates.wsp is deployed, the Litware Team Site template must be available for use in all site collections. In order to make the solution as extensible as possible, all core functionality should be moved to the separate package Litware.Intranet.Core.wsp. Deployment of the package containing the Litware web templates Litware.Intranet.Templates.wsp must be prevented if the core package is not deployed in order to prevent deployment errors and eventually damage on the site structure itself.

Litware.Intranet.Templates contains two features:

The LitwareWebArtifacts feature can be activated only if the LitwareWebTemplateFeature feature is activated as well.

Marketing site collection

An existing marketing collaboration site located in a web application named Collaboration 1 is located at https://collabl.litwareinc.com/sites/marketing. Collaboration 1 contains a document library with approximately 9000 documents for approximately 200 projects. The largest project contains 120 files. Documents are assigned to appropriate projects by using the Projects field. The farm uses the default throttle settings.

Auditors have access to the page that provides statistics on Marketing documents. This page contains a report on document distribution over projects and information about the most active documents, the top inactive documents, and the most active users. Processing the queries can result in working with huge result sets. You must ensure that the information on this page is always available and that the queries are not throttled. The relevant code segment is available in the code sections area (MarketingAudit.ascx.cs).

Application Structure

Relevant portions of the app files are shown below. (Line numbers in the code segments are included for reference only and include a two-letter prefix that denotes the specific file to which they belong.)

Litware.Intranet.Templates.wsp, Module WebTemplatePropertyBag

Element.xml file:

MarketingAudit.ascx.cs

QUESTION NO: 38

You create a document reporting Web Part for the Marketing team auditors.

You need to configure throttling for the Web Part.

Which code segment should you insert at line MA08?

A. spQuery.QueryThrottleMode=SPQueryThrottleOption.Strict;

B. spQuery.QueryThrottleMode=SPQueryThrottleOption.Override;

C. spQuery.QueryThrottleMode=SPQueryThrottleOption.Disable;

D. spQuery.QueryThrottleMode=SPQueryThrottleOption.Default;

Answer: B

Explanation:

The SPQueryThrottleOption enumeration has three values: Default, Override, and Strict. If you use the default value, the standard list view threshold applies to all users except local server administrators, who are not bound by either threshold. If you set the query throttle mode to Override, users who have the required permissions in the Web application user policy can query at the higher "auditors and administrators" threshold. Local server administrators remain unbound by either threshold. Finally, if you set the query throttle mode to Strict, this closes down the local server administrator loophole and the standard list view threshold applies to all users.

Scenario: Auditors have access to the page that provides statistics on Marketing documents. This page con-tains a report on document distribution over projects and information about the most active doc-uments, the top inactive documents, and the most active users. Processing the queries can result in working with huge result sets. You must ensure that the information on this page is always available and that the queries are not throttled. The relevant code segment is available in the code sections area (MarketingAudit.ascx.es).

References:

QUESTION NO: 39

You need to create a design package for the publishing sites.

What should you do?

A. Use SharePoint Designer to create master pages and a design package.

B. Use Visual Studio 2012 to create master pages and generate a design package.

C. Use display templates.

D. Use Design Manager.

Answer: D

Explanation:

InSharePoint 2013, Design Manager can help web developers and designers build and export the visual design of a SharePoint site collection as a package. This package can easily be distributed to customers, or other designated groups, for installation on their site collections. This new feature reduces the complexity of transporting designs, and makes it easier for customers to outsource the visual design of their sites.

Scenario: During the creation and application of the design package to the publishing site, SharePoint 2013 out-of-the-box capabilities must be used as much as possible to ensure simple design changes and to simplify the upgrade procedures.

References:

QUESTION NO: 40 DRAG DROP

You need to create a collaboration template.

How should you complete the relevant code? (To answer, drag the appropriate code segments to the correct location or locations in the answer area. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)

Answer: <map><m x1=4 x2=184 y1=62 y2=86/><m x1=4 x2=184 y1=98 y2=119/><m x1=1 x2=182 y1=129 y2=154/><m x1=5 x2=182 y1=163 y2=188/><m x1=3 x2=183 y1=196 y2=220/><m x1=4 x2=186 y1=229 y2=255/><m x1=0 x2=183 y1=264 y2=290/><m x1=273 x2=456 y1=146 y2=175/><m x1=274 x2=455 y1=181 y2=208/><m x1=276 x2=451 y1=278 y2=310/><m x1=273 x2=456 y1=317 y2=346/><m x1=272 x2=451 y1=351 y2=381/></map>

Explanation:

Box 1: WebTemplate

Most of the features contained within the Team Site template are sufficient; however, a few additions to the template must be made to support the business requirements. In order to achieve this and ensure maximum portability, a web template based on the Team Site definition must be created.

Box 2: BaseTemplateName

Required. The internal name of the site definition on which the web template ultimately derives. This is the value of the Name attribute of the Template element in a WebTemp*.xml file.

Box 3: Name

Attribute: Name

Required. The internal name of the web template.

Box 4: Title

Optional. Optional. The public name of the web template.

Box 5: DisplayCategory

Optional. Specifies the category in which the web template appears in the Microsoft SharePoint Foundation UI when users are selecting a type of website to create; for example, Collaboration, Meetings, or some other custom name. If it is not specified, the default is "Custom".

Scenario: The LitwareWebTemplateFeature feature contains the Litware Team Site web template. Templates with this title must be available in the group Litware in the template selection.

References:

Site Search:

Close

Close
Download Free Demo of VCE
Exam Simulator

Experience Avanset VCE Exam Simulator for yourself.


Simply submit your e-mail address below to get started with our interactive software demo of your free trial.


Enter Your Email Address

Free Demo Limits: In the demo version you will be able to access only first 5 questions from exam.