PrepAway - Latest Free Exam Questions & Answers

Category: 70-542

Exam 70-542: TS: Microsoft Office SharePoint Server 2007 – Application Development

Which file should you modify?

You have an Active Directory domain. All user accounts in the domain contain a custom attribute named Language. The Language attribute is set to either French or English. You have a web application that contains a site in English. You enable the variations to create a French version of the site. You need to ensure that users are automatically redirected to the site that corresponds to the Language attribute of the user account.

Which file should you modify?

What line of code should you use?

You have a publishing site. You plan to add an article page to a site by using a console application. You create a console application that contains the following code segment:

01: Using
02: Dim site As New SPSite(“http://internet”)
03: Dim web as SPWeb = site.RootWeb
04: Dim spSite as new PublishingSite(site)
05: Dim pWeb as PublishingWeb = PublishingWeb.GetPublishingWeb(web)
06: Dim articleCTID as New XPContentTypeID(08373…9373)
07: Dim articlePL as PageLayout=pWeb.GetAvailablePageLayout(articleCTID)(1)
08: Dim pageName as String = DateTime.Now.ToString(“yyyyMMdd-HHmmss”)
09: Dim nPage as PublishingPage =
pWeb.GetPublishingPages().Add(String.Format(“myPage.aspx”,”myPage”,0), articlePL)
10:
11: End Using

You need to ensure that the content owners can modify the page.

What line of code should you use?

What should you do?

You are deploying a Microsoft Office SharePoint Server 2007 hierarchy of sites from a development environment to a staging environment on the same server farm. The development site hierarchy contains a corporate intranet site and departmental sites. Each departmental site contains subsites. You need to recreate the hierarchy of development sites in the staging environment. What should you do?

Which method should you call?

You create a web part that contains the following code segment:

01: Dim profileManager as new UserProfileManager(Current.Context)
02: Dim profile as UserProfile =
profileManager.GetUserProfile(SPContext.Current.Web.CurrentUser.LoginName)
03: Dim colManager as new ColleagueManager(profile)

You need to ensure that the web part displays a list of colleagues for the current user.

Which method should you call?

Which code segment should you add at line 6?

You need to programmatically target a list item to an Audience. You write the following code segment:

01: Dim siteAudience as Audience
02: Dim context as ServerContext = ServerContext.GetContext(site)
03: Dim audManager as New AudienceManager(context)
04: siteAudience = audManager.GetAudience(“audience1”)
05: Dim id as GUID = siteAudience.AudienceID
06:
07: Item.Update()

Which code segment should you add at line 6?


Page 5 of 15« First...34567...10...Last »