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 operate a Microsoft Office SharePoint Server 2007 site. You have a document library that is subject to an audit. You need to prevent relevant records from expiring during the ongoing audit.
What should you do?
What should you do?
You are developing a Microsoft Office SharePoint 2007 solution that integrates with Microsoft SQL Server 2005 Reporting Services. You need to configure the SharePoint solution to allow the storage of reports in SharePoint document libraries.
What should you do?
What should you do?
You are making changes to a Microsoft Office SharePoint Server 2007 Search Center Web site that uses a fixed keyword query. You need to make changes to the text that is displayed when a search fails to return a result. What should you do?
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 code segment should you use?
You create an application for a Microsoft Office SharePoint Server 2007 server. You need to write code that retrieves all users for an audience named Audience1. Which code segment should you use?
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?
Which code segment should you use?
You create a Microsoft Office SharePoint Server 2007 application. The application has a user named UserA.
You need to retrieve a list of colleagues for UserA.
Which code segment should you use?