PrepAway - Latest Free Exam Questions & Answers

Tag: 70-542

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

What are two possible ways to achieve this goal?

Your company has a Microsoft Office SharePoint Server 2007 farm. The farm contains two site collections named Draft and ProductionReady. You configure the farm to deploy content incrementally from the Draft site collection to the ProductionReady site collection. You need to ensure that the content authors have a higher priority for pages that they deploy to the ProductionReady site collection. What are two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose two.)

What should you do?

You create an audience named “Sales” that contains one rule. You plan to add a second rule that contains an “or” condition. You write the following code segment.

01: Using objSite as SPWeb = New SPSite(“http://internet”).OpenWeb()
02:
03: Dim AM as New
AudienceManager(Microsoft.Office.Server.ServerContext.GetContext(objSite.site())
04: Dim Sales as Audience = AM.GetAudiences(“Sales”)
05:
06: Dim R1 as New AudienceRulesComponent(Nothing, “OR”, Nothing)
07: Sales.AudienceRules.Add(R1)
08: Dim R2 as New AudienceRulesComponent(“AccountName”, “Contains”, “Sales”)
09: Sales.AudienceRules.Add(R2)
10: Sales.Commit()
11:
12: End Using

You run the code in your development environment. You notice that the second rule is not created. You need to ensure that both rules are created when you run the code in the production environment.

What should you do?

Which code segment should you insert?

You are creating a Microsoft Office SharePoint Server 2007 web part. You write the following code segment:

01: Public cmdCrawler as Button
02: Protected Overloads OverRides Sub CreateChildControl()
03: cmdCrawler = New Button AS Crawler cmdCrawler.Click, AddressOf CommandCrawl_Click
04: cmdCrawler.Text = “Index”
05: Controls.Add(cmdCrawler)
06: End Sub
07:

08: Public Sub cmdCrawler_Click(ByVal sender AS object, ByVal e as eventArgs)
09: Dim xspContent as Microsoft.Office.Server.Search.Administration.Content = New 12
10: Microsoft.Office.Server.Search.Administration.Content
(SearchContent.Current)
11: …
12: End Sub

You need to ensure that the web part initiates a search crawl of a content source named Patents. Which code segment should you insert?

What should you do?

You create a Microsoft Office SharePoint Server 2007 site. You create a list named Projects that includes a column named TargetAudience. You create a Web Part that displays information from the Projects list. You need to target items in the Projects list to the audience specified by the value in the TargetAudience column. What should you do?

Which code segment should you insert at line 10?

You are creating a Microsoft Office SharePoint Server 2007 site. You create a Microsoft WinForms application to enter information about a user.

You write the following code segment. (Line numbers are included for reference only.)

01 static void AddUser (string[] user_name )
02 {
03 using (SPSite site =
04 new SPSite(“http://sitename”))
05 {
06 ServerContext context =
07 ServerContext.GetContext(site);
08 UserProfileManager profileManager =
09 new UserProfileManager(context);
10 …

11 }
12 }

You need to add a user profile to the profile store.

Which code segment should you insert at line 10?


Page 2 of 1512345...10...Last »