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 method should you use?
You create a custom Windows application to search SharePoint content. You add a reference to the Windows SharePoint Services Query Web Service. You need to search the SharePoint content and return an ADO.Net dataset.
Which method should you use?
Which code segment should you use?
You are creating a web service that uses Search Service in SharePoint 2007. The service uses the key word query object. The web service must return results only for the author named John Smith. You need to construct a query for the key word query object.
Which code segment should you use?
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 have a distribution list in the Active Directory. You need to create a MySites membership group from the distribution list.
What should you do?
Which code segment should you use?
You are creating a Microsoft Office SharePoint Server 2007 application to increase the search capability of five site collections that belong to a single farm.
You need to retrieve all available search contexts for the Web site collection on which the application is initiated.
Which code segment should you use?
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?
What should you do?
Your company stores product information in a Microsoft SQL Server 2005 database. You create a Business Data Catalog (BDC) definition to search for product information within the database. You need to ensure that incremental crawls can be performed in the database for indexing. 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?