2010-04-14 16:42:00 weixin_34087503 阅读数 0

将以下试题熟练掌握,即可通过此考试(MS Office SharePoint Server 2007.Application Development)

1.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 Shared Sub AddUser(ByVal user_name As String())
02 ' Using
03 Dim site As SPSite = New SPSite("http://sitename/")
04 Try
05 Dim context As ServerContext = _
06 ServerContext.GetContext(site)
07 Dim profileManager As UserProfileManager = New _
08 UserProfileManager(context)
09 ...
10 Finally
11 CType(site, IDisposable).Dispose()
12 End Try 13 End Sub
You need to add a user profile to the profile store.
Which code segment should you insert at line 09?
A. Private u As UserProfile = _
profileManager.GetUserProfile(user_name)
...
B. Private profileManager As UserProfileManager = New _
UserProfileManager(context)
Private u As UserProfile = profileManager.GetUserProfile(user_name)
...
u.Commit
C. Private user_name As String = "<UserProfile>"
...
user_name += userProfile + user_name
...
user_name += "</UserProfile>"
profileManager.CreateUserProfile(user_name)
D. Private u As UserProfile = _
profileManager.CreateUserProfile(user_name)
...
u.Commit
Testinside
TestInside Help You Pass Any IT Exam http://www.testinside.com/
Answer: D
2. 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?
A. Private Sub RetrieveColleagues(ByVal Cntxtobj As ServerContext)
...
Dim site As SPSite = New SPSite("http: //servername/sites/site1")
Dim profileManager As UserProfileManager = New _
UserProfileManager(Cntxtobj) Dim profile As UserProfile = _
profileManager.GetUserProfile("abc\UserA")
Dim colleagues As Colleague() = profile.Colleagues.GetItems
Site.Dispose
...
End Sub
B. Private Sub RetrieveColleagues(ByVal Cntxtobj As ServerContext)
...
Dim site As SPSite = New SPSite("http: //servername/sites/site1")
Dim context As ServerContext = ServerContext.GetContext(site)
Dim profileManager As UserProfileManager = New _
UserProfileManager(context) Dim profile As UserProfile = _
profileManager.GetUserProfile("abc\UserA")
Dim colleagues As UserProfile() = _
profile.Colleagues.GetCommonColleagues
Site.Dispose
...
End Sub
C. Private Sub RetrieveColleagues(ByVal Cntxtobj As ServerContext)
...
Dim site As SPSite = New SPSite("http: //servername/sites/site1")
Dim context As ServerContext = ServerContext.GetContext(site)
Dim profileManager As UserProfileManager = New _
UserProfileManager(context) Dim profile As UserProfile = _
profileManager.GetUserProfile("abc\UserA")
Dim manager As ColleagueManager = _
Testinside
TestInside Help You Pass Any IT Exam http://www.testinside.com/
New ColleagueManager(profile)
Dim profiles As UserProfile() = _
manager.GetColleaguesOfColleagues
Site.Dispose
...
End Sub
D. Private Sub RetrieveColleagues(ByVal Cntxtobj As ServerContext)
...
Dim site As SPSite = New SPSite("http: //servername//sites/site1")
Dim context As ServerContext = ServerContext.GetContext(site)
Dim audMgr As AudienceManager = New AudienceManager(context)
Dim web As SPWeb = site.AllWebs("mainpage")
Dim audienceIDNames As ArrayList = _
audMgr.GetUserAudienceIDs("domain\userA", True, web)
Site.Dispose
...
End Sub
Answer: A
3. You create a Microsoft Office SharePoint Server 2007 site. The site is configured to use a Shared
Services Provider (SSP) that manages user profiles. The user profiles contain user contact information.
You need to retrieve the telephone number of a user. What should you do?
A. Perform a keyword search by using the WorkPhone: prefix.
B. Obtain the value of the WorkPhone node from the SPUser.Xml property of the user.
C. Obtain the value of the UserProfile[PropertyConstants.WorkPhone] property of the user.
D. Obtain the value of the PropertyInformation.Description property where the value of the
PropertyInformation.Name property is WorkPhone.
Answer: C
4. Your organization has a department named product testing. You are creating a new membership named
Product Testing. You are adding a distribution list to the new membership. You need to ensure that the
membership is displayed only to managers. What should you do?
A. Call the MemberGroupData method of the UserProfiles object.
B. Call the GetPrivacyPolicy method of the UserProfileManager object.
C. Pass Privacy.Manager as the privacy setting to the Membership.Create method.
D. Pass PrivacyPolicyIdConstants.MembershipsFromDistributionLists to the CreateMemberGroup method
of the user profile.
Testinside
TestInside Help You Pass Any IT Exam http://www.testinside.com/
Answer: C
5. You create a Microsoft Office SharePoint Server 2007 site. A document library named
CompanyWorkbooks on the site contains Microsoft Office Excel workbooks. You need to ensure that
users can access the workbooks in the CompanyWorkbooks document library by using Excel Services in
Microsoft Office SharePoint Server 2007. What should you do?
A. Define the site as a managed path within SharePoint.
B. Add the CompanyWorkbooks URL to the trusted location list.
C. Edit the permissions of the CompanyWorkbooks document library to grant full control to the SharePoint
application pool identity account.
D. Create a custom security policy file for the CompanyWorkbooks document library. Add the file to the
securityPolicy section of the Web.config file for the site.
Answer: B
6. You are creating a Microsoft Office SharePoint Server 2007 application. The application reads data from
the Microsoft Office Excel 2007 workbook named SalesGoals.xls. SalesGoals.xls is located in a document
library. The first sheet of the SalesGoals.xls workbook contains the following information.
You need to retrieve the values for 2008 from within your application.
Which two actions should you perform? (Each correct answer provides part of the solution. Choose two.)
A. Instantiate a new RangeCoordinates object.
B. Instantiate the Microsoft Office Excel Web Services service.
C. Call the GetRangeA1 method by passing B3:D3 as a parameter.
D. Call the GetRange method along with a RangeCoordinates object by using the following parameters.
column=2, row=3, height=1, width=3
Answer: BC
7. You create an application for a Microsoft Office SharePoint Server 2007 server. You create a call
center dashboard. You create a Key Performance Indicator (KPI) list that contains KPIs. You add a KPI Web
Part to the dashboard to view KPIs. You need to permit users to view details that make up each KPI.
What should you do?
A. Add a link to each KPI in the list to take the user to a details page.
B. Add data to a custom SharePoint list and use built-in filter and view capabilities.
C. Add a Filter Web Part to the dashboard page and connect the page to the KPI list Web Part.
D. Filter the items in the KPI list Web Part by the indicator that the user wants to view.
Testinside
TestInside Help You Pass Any IT Exam http://www.testinside.com/
Answer: A
8. You are creating two user-defined functions (UDFs) of Excel Services in Microsoft Office SharePoint
Server 2007.
You write the following code segment.
Public Class Class1
Public Function MyDouble(ByVal d As Double) As Double
Return d * 9
End Function
Public Function ReturnDateTimeToday() As DateTime
Return (DateTime.Today)
End Function
End Class
You need to ensure that the MyDouble method and the ReturnDateTimeToday method are recognized as
UDFs of Excel Services.
What should you do?
A. Add a reference to the Excel Services DLL.
B. Change the methods from public to private.
C. Add an out parameter to each of the method statements.
D. Mark the class by using the UdfClass attribute and mark the methods by using the UdfMethod attribute.
Answer: D
9. Your company stores employee details in a Microsoft SQL Server database. You are creating a Report
Center site on a Microsoft Office SharePoint Server 2007 server. You need to ensure that a report on
employee details can be generated in the Report Center site. What should you do?
A. Add the Data Connections library to the trusted file locations.
B. Import the application definition to the Business Data Connector.
C. Import the Office Data Connection file to the trusted data providers.
D. Create an Office Data Connection file in a trusted Data Connections library.
Answer: D
10. You are developing a Microsoft Office SharePoint Server 2007 solution that integrates with Microsoft
SQL Server 2005 Reporting Services. You need to configure the SharePoint solution to allow storage of
reports in SharePoint document libraries. What should you do?
A. Specify the Report Server URL in the Report Explorer Web Part.
B. Configure the proxy server endpoint in the Reporting Services Configuration tool.
C. Specify a Report Explorer Web Part as the target for the Report Viewer Web Part.
D. Specify a Report Viewer Web Part as the target for the Report Explorer Web Part.
Testinside
TestInside Help You Pass Any IT Exam http://www.testinside.com/
Answer: B
11. You are designing a Microsoft Office SharePoint Server 2007 solution. A Microsoft SQL Server 2005
Analysis Services cube stores key performance indicators (KPIs). You need to display details of a KPI in
a Web Part. Which two actions should you perform? (Each correct answer presents part of the solution.
Choose two.)
A. Create a KPI List.
B. Add a List Item Web Part.
C. Create a .odc file for the data connection.
D. Create a .udl file for the data connection.
E. Create a Business Data Catalog (BDC) definition.
Answer: AC
12. You have a Microsoft Office SharePoint Server 2007 site. You create a Microsoft Office Excel 2007
workbook that contains the telephone numbers of all your company locations. You need to ensure that
users can filter the Office Excel 2007 workbook on the basis of company locations by using Excel Services
in Microsoft Office SharePoint Server 2007. What should you do?
A. Create an ActiveX control in the workbook.
B. Create an Excel 2007 Microsoft Visual Basic for Applications (VBA) application in the workbook.
C. Filter the workbook by using the Data-Filter option of the Excel 2007 workbook.
D. Filter the list in place by using Excel 2007, and protect the Excel 2007 workbook that contains the
telephone numbers.
Answer: C
13. You implement a custom function as a user-defined function (UDF) in Excel Services in Microsoft Office
SharePoint Server 2007.
A Microsoft Office Excel 2007 workbook uses the custom function to generate a random number between
100 and 500.
You need to generate a new random number each time you load the workbook.
Which code segment should you use?
A. Public Class MyUdfs
Private rand As Random = New Random
<UdfMethod()> _
Public Function GetRandomNumber() As Integer
Return (rand.Next(100, 500))
End Function
End Class
B. <UdfClass()> _
Testinside
TestInside Help You Pass Any IT Exam http://www.testinside.com/
Public Class MyUdfs
Private rand As Random = New Random
<UdfMethod(IsVolatile=True)> _
Public Function GetRandomNumber() As Integer
Return (rand.Next(100, 500))
End Function
End Class
C. <UdfClass()> _
Public Class MyUdfs
Private rand As Random = New Random
Public Function GetRandomNumber() As Integer
Return (rand.Next(100, 500))
End Function
End Class
D. Public Class MyUdfs
Private rand As Random = New Random
Public Function GetRandomNumber() As Integer
Return (rand.Next(100, 500))
End Function End Class
Answer: B
14. You are creating a Microsoft Office SharePoint Server 2007 Report Center Web site. Your company
stores product data in a Microsoft SQL Server 2005 database named Product Management. You need to
ensure that the product data is available for use in Microsoft Office Excel 2007 reports. What should you
do?
A. Upload a custom Office Data Connection file to the Data Connections library.
B. Upload a custom set of Microsoft SQL Server Reporting Services Report Model files to the Data
Connections library.
C. Create a single sign-on (SSO) provider that manages access to the Product Management database.
D. Create a Business Data Connection for the Product Management database, and define entities in the
Business Data Catalog (BDC) definition.
Answer: A
15. 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?
A. Private audMgr As AudienceManager = New AudienceManager()
Private audiences As AudienceCollection = audMgr.Audiences
Testinside
TestInside Help You Pass Any IT Exam http://www.testinside.com/
Private audience1 As Audience = audiences("Audience1")
B. Private audMgr As AudienceManager = New AudienceManager()
Private membershipList As ArrayList = _
audMgr.Audiences("Audience1").GetMembership()
C. Private audMgr As AudienceManager = New AudienceManager()
Private audience1 As AudienceCollection = _
audMgr.Audiences
D. Private site As SPSite = New _
SPSite("http: //servername//sites/site1")
Private context As ServerContext = _
ServerContext.GetContext(site)
Private audMgr As AudienceManager = _
New AudienceManager(context)
Private web As SPWeb = site.AllWebs(0)
Private audienceIDNames As ArrayList = _
audMgr.GetUserAudienceIDs("Audience1", True, web)
Answer: B
16. You are creating a Microsoft Office SharePoint Server 2007 site. The site has five audiences. A user
might belong to more than one of the five audiences. You need to obtain a list of audience names for the
current user. Which code segment should you use?
A. Private Sub ListAudienceNames()
...
Dim al As AudienceLoader = AudienceLoader.GetAudienceLoader
Dim am As AudienceManager = am.CurrentServerContext
Dim audiences As ArrayList = al.GetUserAudienceIDs(True)
For Each audience As Object In audiences
Dim a As Audience = am.Audiences(CType(audience, Guid))
System.Web.HttpContext.Current._
Response.Write("Audience: " + audience.ToString)
Next
...
End Sub
B. Private Sub ListAudienceNames()
...
' Using Dim web As SPWeb = SPWeb.OriginalBaseUrl
Testinside
TestInside Help You Pass Any IT Exam http://www.testinside.com/
Try
Dim user As SPUser = web.CurrentUser
Dim am As AudienceManager = am.CurrentServerContext
Dim audiences As AudienceCollection = am.Audiences
For Each a As Audience In audiences
If a.IsMember(user.LoginName) Then
System.Web.HttpContext.Current.Response._
Write("Audience: " + AudienceName)
End If
Next
Finally
CType(web, IDisposable).Dispose()
End Try
...
End Sub
C. Private Sub ListAudienceNames()
...
Dim user As String = WindowsIdentity.GetCurrent.Name
Dim web As SPWeb = SPWeb.OriginalBaseUrl
Dim am As AudienceManager = am.CurrentServerContext
Dim audList As ArrayList = am.GetUserAudienceIDs(user, False, web)
For Each obj As Object In audList
Dim a As Audience = CType(obj, Audience)
System.Web.HttpContext.Current.Response._
Write("Audience: " + a.AudienceName)
Next
...
End Sub
D. Private Sub ListAudienceNames()
...
' Using
Dim web As SPWeb = SPWeb.OriginalBaseUrl
Try
Dim user As String = web.CurrentUser.Name
Dim am As AudienceManager = am.CurrentServerContext
Testinside
TestInside Help You Pass Any IT Exam http://www.testinside.com/
For Each a As Audience In am.Audiences
If am.IsMemberOfAudience(user, a.AudienceName) Then
System.Web.HttpContext.Current.Response._
Write("Audience: " + a.AudienceName)
End If
Next
Finally
CType(web, IDisposable).Dispose()
End Try
...
End Sub
Answer: B
17. You are creating a Microsoft Office SharePoint Server 2007 site. The site contains content that is
relevant to members of the DOMAIN\Developers security group. You need to ensure that the content is
targeted to members of the Developers group. What should you do?
A. Create an audience that is based on the DOMAIN\Developers group.
B. Create a site group that has the DOMAIN\Developers group as a member.
C. Apply a filter to the lists to display only members of the DOMAIN\Developers group.
D. Create a custom Web Part that verifies the membership of the DOMAIN\Developers group and displays
the content of the Tasks list only to members of that group.
Answer: A
18. You are creating a Microsoft Office SharePoint Server 2007 site. An audience named Purchasing
contains all the users in a Microsoft Active Directory group. You need to display the name of each
member of the audience. Which code segment should you use?
A. Dim audManager As AudienceManager = New AudienceManager()
Dim aud As Audience = audManager.Audiences("Purchasing")
Dim members As ArrayList = aud.GetMembership()
For Each obj As Object In members
Dim user As UserInfo = CType(obj, UserInfo)
System.Web.HttpContext.Current.Response.Write( _
"User: {0}" + user.PreferredName)
Next
B. Dim audManager As AudienceManager = New AudienceManager()
Dim members As AudienceCollection = audManager.Audiences
For Each obj As Audience In members
Testinside
TestInside Help You Pass Any IT Exam http://www.testinside.com/
Dim user As String = _
System.Security.Principal.WindowsIdentity.GetCurrent.Name
If obj.IsMember(user) Then
System.Web.HttpContext.Current.Response.Write("User: {0}" + user)
End If
Next
C. Dim audManager As AudienceManager = New AudienceManager()
Dim audCol As AudienceCollection = audManager.Audiences
Dim aud As Audience = audManager.Audiences("Purchasing")
Dim members As ArrayList = aud.GetMembership()
For Each obj As Object In audCol
Dim user As UserInfo = CType(members(audCol.Count), UserInfo)
System.Web.HttpContext.Current.Response.Write( _
"User: {0}" + user.PreferredName)
Next
D. Dim members As Audience_List = New Audience_List()
Dim audManager As AudienceManager = New AudienceManager()
Dim aud As Audience = audManager.Audiences("Purchasing")
members.GetData()
members.DataBind()
Answer: A
19. 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?
A. Use an AudiencePicker object to select the specified audience.
B. Use an AudienceManager object to ascertain the audience membership.
C. Use a SPRoleAssignment object to associate users with the Projects list.
D. Use an AudienceRuleComponent object to specify the conditions for audience membership.
Answer: B
20. Your company uses an ASP.NETWeb site. You create a Microsoft Office InfoPath form named MyForm.
You are creating a custom control that is derived from the XMLFormView class. The custom control will
display MyForm within an ASP.NET page on the Web site. You need to ensure that MyForm can be
displayed within an ASP.NET page on the Web site. What should you do?
A. Set the xsnLocation property of the custom control to MyForm.xsn.
Testinside
TestInside Help You Pass Any IT Exam http://www.testinside.com/
B. Set the xmlLocation property of the custom control to MyForm.xml.
C. Create an OnInitialize event for the custom control and set XPathNavigator to MyForm.xsn.
D. Create an OnPreRender event for the custom control and set XPathNavigator to MyForm.xsn.
Answer: A
21. Your organization has a Microsoft Office Forms Server 2007 server. The server hosts a form template
named TemplateA. You create a new version of the form named TemplateB. You need to create an
automated administration task that ensures that the sites use TemplateB instead of TemplateA. What
should you do?
A. Call the Activate method of the FormTemplateCollection object for the server farm.
B. Call the Quiesce method of the FormTemplate object for each Web site in the site collection.
C. Call the Update method of the FormTemplate object for each Web site in the site collection.
D. Call the UpgradeFormTemplate method of the FormTemplateCollection object for the server farm.
Answer: D
22. You create a Microsoft Office SharePoint Server 2007 site. The site contains a form library. A Microsoft
Office InfoPath form from the form library must be converted to a Web page by using an existing InfoPath
form converter. When you select the existing form converter, you receive a conversion error. You need
to ensure that the document is converted without errors. What should you do?
A. Add a Web page that uses the XmlFormView control.
B. Publish the form to the form library by using an administrator account.
C. Modify the conversion schedule for the document-to-page converter.
D. Use a Universal Data Connection (UDC) between the InfoPath form and the SharePoint site.
Answer: B
23. You are designing a Microsoft Office SharePoint Server 2007 solution. You need to implement a
Single Sign On (SSO) provider to access a Business Data Catalog (BDC). What should you do?
A. Reference the Microsoft.SharePoint.Portal assembly.
B. Reference the Microsoft.SharePoint.SoapServer assembly.
C. Reference the Microsoft.Office.Server.Utilities assembly.
D. Reference the Microsoft.Office.Server.WebControls assembly.
Answer: A
24. You create a Microsoft Office InfoPath workflow task form for users. The form contains all the details of
each task. You need to store the value of the Comments field in a variable named UserInput when each
user submits the form. Which code segment should you use?
A. Dim UserInput As String = New String
Dim wpTProps As SPWorkflowTaskProperties = New _
SPWorkflowTaskProperties
Testinside
TestInside Help You Pass Any IT Exam http://www.testinside.com/
...
UserInput = wpTProps.ExtendedProperties("Comments").ToString
B. Private wpAProps As SPWorkflowActivationProperties = New _
SPWorkflowActivationProperties
...
Private UserInput As Object = wpAProps.Item.Fields("Comments")
C. Private wpAProps As SPWorkflowActivationProperties = New _
SPWorkflowActivationProperties
Private serializer As XmlSerializer = New _
XMLSerializer(GetType(MyFields))
Private reader As xmlTextReader = New XMLTextReader(New _
System.IO.StringReader(wpAProps.InitiationData))
Private fields As MyFields = serializer.Deserialize(reader)
Private UserInput As String = fields.Users(i).Comments
D. Private serializer As XmlSerializer = New _
XmlSerializer(GetType(InitForm))
Private reader As XmlTextReader = New XmlTextReader(New _
System.IO.StringReader(workflowProps.InitiationData))
Private initform As InitForm = _
CType(serializer.Deserialize(reader), InitForm)
Private UserInput As String = initform.comments
Answer: A
25. You are designing a Microsoft Office SharePoint Server 2007 solution. You need to create a workflow
that will access data from a custom Microsoft Office Infopath task form. Which two actions should you
perform? (Each correct answer presents part of the solution. Choose two.)
A. Add the workflow task schema to the task form as a secondary data source.
B. Add the workflow task schema to the task form as the primary data source.
C. Execute the GetWorkflowData method on a SPWorkflowTask object.
D. Execute the GetNoCodeTemplate method on a SPWorkflowTaskManager object.
E. Access the ExtendedProperties property of the SPWorkflowTaskProperties object.
Answer: AE
26. Your company uses a Microsoft Office SharePoint Server 2007 site that has user profiles enabled. Your
company also uses a Web-based human resources (HR) application that runs on a different server. The
HR department wants to display the user profile data from the SharePoint site in the Web-based application.
You need to retrieve the user profile information from within theWeb-based application. Which method of
Testinside
TestInside Help You Pass Any IT Exam http://www.testinside.com/
the UserProfileService object should you use?
A. The GetUserProfileByName method.
B. The ModifyUserPropertyByName method.
C. The GetCurrentChangeToken method.
D. The GetUserCurrentChangeToken method.
Answer: A
27. You are creating a Microsoft Office SharePoint Server 2007 Web application that references a Business
Data Catalog (BDC) definition for a customer relationship management (CRM) system. You need to
ensure that users can perform a keyword search on the CRM information from their My Site page. What
should you do?
A. Provide users with a parent data related list Web Part for the BDC.
B. Provide a custom search Web Part that is restricted to a BDC-specific search scope.
C. Create a business data item Web Part that is restricted to the selected keyword of the user.
D. Create a targeted tab on a Search Center site and target the search results at the My Site page of the
users.
Answer: B
28. You create a Microsoft WinForms application that allows you to search within a Microsoft Office
SharePoint Server 2007 site collection.
You write the following code segment.
Private searchWS As SPSSearchWS.QueryService = New _
SPSSearchWS.QueryService
Private query As String = "My_Query"
You need to bind a DataGridView control directly to a query result set.
Which code segment should you use?
A. dataGridView1.DataSource = searchWS.QueryEx(query)
B. dataGridView1.DataSource = searchWS.Query(query)
C. Dim sqlQuery As FullTextSqlQuery = New FullTextSqlQuery(New _
SPSite(searchWS.Url))
sqlQuery.ResultTypes = ResultType.RelevantResults
sqlQuery.QueryText = query
Dim results As ResultTableCollection = sqlQuery.Execute
dataGridView1.DataSource = results
D. kRequest.QueryText = query
kRequest.ResultTypes = kRequest.ResultTypes Or _
(ResultType.RelevantResults)
Testinside
TestInside Help You Pass Any IT Exam http://www.testinside.com/
Dim results As ResultTableCollection = kRequest.Execute
dataGridView1.DataSource = results
Answer: A
29. You are modifying a Microsoft Office SharePoint Server 2007 Search Center site. You create a
customized XSLT style sheet to change the appearance of ten Search Core results Web Parts on separate
site tabs. You need to ensure that theWeb Parts use the new style sheet. What are two possible ways
to achieve this goal? (Each correct answer presents a complete solution. Choose two.)
A. Copy and paste the style sheet in the XSLT editor of each result set for the Web Parts on each tab.
B. Modify the Theme.css file in the SharePoint Server 2007 Search Center site to refer to the new style
sheet.
C. Modify the Onet.xml file in the SharePoint Server 2007 Search Center site to refer to the new style sheet.
D. Publish the XSLT style sheet to a shared location. Update the XSLT Link property of the Web Parts to
point to the URL of the style sheet document.
Answer: AD
30. You are creating a Microsoft Office SharePoint Server 2007 application that uses the Search service.
You need to ensure that the search results are based on an existing keyword. Which code segment
should you use?
A. Private Sub keywordQueryExecute(ByVal strQueryText As String)
...
Dim kRequest As KeywordQuery = New _
KeywordQuery(ServerContext.Current)
kRequest.QueryText = strQueryText
kRequest.ResultTypes = kRequest.ResultTypes Or _
(ResultType.RelevantResults)
Dim resultTbls As ResultTableCollection = kRequest.Execute
...
End Sub
B. Private Sub keywordQueryExecute(ByVal strQueryText As String)
...
Dim kRequest As KeywordQuery = New _
KeywordQuery(ServerContext.Current)
kRequest.QueryText = "SELECT * FROM scope() _
WHERE keyword = " + strQueryText
kRequest.ResultTypes = kRequest.ResultTypes Or _
(ResultType.RelevantResults)
Testinside
TestInside Help You Pass Any IT Exam http://www.testinside.com/
Dim resultTbls As ResultTableCollection = kRequest.Execute
...
End Sub
C. Private Sub keywordQueryExecute(ByVal strQueryText As String)
...
Dim kRequest As KeywordQuery = New _
KeywordQuery(ServerContext.Current)
kRequest.QueryText = "SELECT * FROM scope(" + strQueryText + ")"
kRequest.ResultTypes = kRequest.ResultTypes Or _
(ResultType.RelevantResults)
Dim resultTbls As ResultTableCollection = kRequest.Execute
...
End Sub
D. Private Sub keywordQueryExecute(ByVal strQueryText As String)
...
Dim kRequest As KeywordQuery = New _
KeywordQuery(ServerContext.Current)
kRequest.QueryText = "SELECT " + strQueryText + " FROM scope()"
kRequest.ResultTypes = kRequest.ResultTypes Or _
(ResultType.RelevantResults)
Dim resultTbls As ResultTableCollection = kRequest.Execute
...
End Sub
Answer: A
31. You are creating a Microsoft Office SharePoint Server 2007 Web Part.
You write the following code segment. (Line numbers are included for reference only.)
01 Public cmdCrawl As Button
02
03 Protected Overloads Overrides Sub CreateChildControls()
04 cmdCrawl = New Button
05 AddHandler cmdCrawl.Click, AddressOf cmdCrawl_Click
06 cmdCrawl.Text = "Update Index"
07 End Sub
08
09 Public Sub cmdCrawl_Click(ByVal sender As Object, ByVal e As EventArgs)
Testinside
TestInside Help You Pass Any IT Exam http://www.testinside.com/
10 Dim sspContent As Microsoft.Office.Server.Search.Administration.Content = New
11
12 Microsoft.Office.Server.Search.Administration.Content(SearchContext.Current)
13 ...
14 End Sub
You need to ensure that the Web Part initiates a search crawl of a scope named Patents.
Which code segment should you insert at line 13?
A. Dim sspContentSources As ContentSourceCollection = _
sspContent.ContentSources
Dim cs As ContentSource = sspContentSources("Patents")
cs.StartFullCrawl
B. Dim sspContentSources As ContentSourceCollection = _
sspContent.ContentSources
Dim TargetScope As Uri = New _
Uri("http: //myportal/SearchCenter/Search.aspx?Scope=Patents")
sspContentSources.Update(TargetScope)
C. Dim sspContentSources As ContentSourceCollection = _
sspContent.ContentSources
Dim crawlmappings As CrawlMappingCollection = _
sspContentSources.Parent.CrawlMappings
Dim ResultsPage As Uri = New Uri(Me.Context.ToString)
Dim TargetScope As Uri = New _
Uri("http: //myportal/SearchCenter/Search.aspx?Scope=Patents")
crawlmappings.Create(ResultsPage, TargetScope)
D. Dim sspContentSources As ContentSourceCollection = _
sspContent.ContentSources
Dim cs As ContentSource = sspContentSources("Patents")
cs.Update
Answer: A
32. You are customizing a Search Center Web site on a Microsoft Office SharePoint Server 2007 site
collection. You add a new column named CompletionDate to your search results. You need to ensure
that the search terms entered by users appear highlighted in the CompletionDate column. What should
you do?
A. Create a managed property named CompletionDate in Shared Services Provider (SSP).
B. Set the Query Box Prompt String property of the Search Box Web Part to CompletionDate.
Testinside
TestInside Help You Pass Any IT Exam http://www.testinside.com/
C. Add a section in the XSLT style sheet of the Search Core Results Web Part that uses the HitHighlighting
template.
D. Add an XML node for the CompletionDate column that includes a HitHighlighted attribute in the Selected
Columns property of the Search Box Web Part.
Answer: C
33. You create a search center site for your Microsoft Office SharePoint Server 2007 portal. You need to
display a new column named CompletionDate on a Search Core Results Web Part. Which two steps
should you perform? (Each correct answer presents part of the solution. Choose two.)
A. Add CompletionDate to the Additional Query Terms property on the Search Box Web Part.
B. Add a section in the XSLT style sheet of the Search Core Results Web Part to process the
CompletionDate column.
C. Add a managed property entry in Enterprise Search Administration for items that have the
CompletedDate property.
D. Update the Selected Columns property of the Search Core ResultsWeb Part to include the following text:
<Column Name="CompletionDate"/>
Answer: BD
34. You create a Microsoft Office SharePoint Server 2007 Search Center site. The site has a custom tab
that restricts users to a Business Data Connector for a Product tracking system.
You need to restrict the data displayed to items from the custom columns named ProductName,
ProductNumber, and ProductColor.
What should you do?
A. Create a scope rule named contentclass in the Products scope for each required column that limits the
results to the required items.
B. Replace the contents of the Selected Columns field in the Search Core Results Web Part with the
following XML fragment.
<root xmlns:xsi="http: //www.w3.org/2001/XMLSchema-instance">
<SelectColumns>
<Column Name="ProductName"/>
<Column Name="ProductNumber"/>
<Column Name="ProductColor"/>
</SelectColumns> </root>
C. Edit the XSLT style sheet that renders the Search Core results Web Part and add the following XML
fragment.
<p class="srch-Metadata">
<xsl:call-template name="DisplayString">
Testinside
TestInside Help You Pass Any IT Exam http://www.testinside.com/
<xsl:with-param name="str" select="ProductName" />
<xsl:with-param name="str" select="ProductNumber" />
<xsl:with-param name="str" select="ProductColor" />
< </xsl:call-template>
</p>
D. Implement the following SQL query in the field named Fixed Keyword Query in the Search Core results
Web Part properties.
SELECT ProductName, ProductNumber, ProductColor FROM scope() WHERE "scope" = 'Products'
Answer: B
35. 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?
A. Dim strSite As String = "http: //yourSiteName"
Dim srchContext As SearchContext = SearchContext.GetContext(New _
SPSite(strSite))
B. Dim srchContext As SearchContext = _
SearchContext.GetContext(ServerContext.Current)
C. Private searchservice As SearchService = New _
SearchService("Search_SSPS Name", SPFarm.Local)
Private srchContext As SearchContext = _
SearchContext.GetContext(searchservice.Id.ToString)
D. Dim searchWebService As WASearchWebService1.SPSSearchWS._
QueryService = New WASearchWebService1.SPSSearchWS.QueryService()
searchWebService.Url = "http: //myportal"
Dim srchContext As SearchContext = SearchContext.GetContext(New _
SPSite(searchWebService.ToString()))
Answer: B
36. 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?
A. Modify the dvt_1.body template to display the new text when the value of the DisplaySize property is
zero.
B. Modify the default text in the dvt_1.empty template to the new text in the Search Core Results Web Part
on the results page.
C. Modify the default text in the dvt_1.noKeyword template to the new text in the Search Core Results Web
Testinside
TestInside Help You Pass Any IT Exam http://www.testinside.com/
Part on the results page.
D. Modify the Import Error Message property of the Search Core Results Web Part of the results page to
include the new text when the Web Part does not import any results from the search service.
Answer: B
37. You are creating a Microsoft Office SharePoint Server 2007 site. A document library contains
documents on new products. The documents must contain a label that denotes the product status.
You need to add a label to all documents in the library. What should you do?
A. Modify Variation Labels from the Site Collection Administration page.
B. Start an approval workflow each time a new document is added to the library.
C. Modify the document template for the existing document library to include the label.
D. Create an Information Management Policy feature for the document library that enforces label creation.
Answer: D
38. You are creating 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 an ongoing audit. What
should you do?
A. Enable Record routing on the related Records Center site.
B. Create a hold for the audit and add all relevant documents.
C. Remove all users of the document library from the data reader role on the site configuration database.
D. Create an Information Management Policy feature that tracks audit information. Attach the policy to the
document library.
Answer: B
39. 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?
A. Create and implement a site template.
B. Create and implement a portal site template.
C. Create an empty site collection on the server farm and use Page Publishing to duplicate pages.
D. Create copies of the site definition files, page layouts, master pages, and Web Part assemblies for each
site to be created.
Answer: B
40. 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
Testinside
TestInside Help You Pass Any IT Exam http://www.testinside.com/
two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose two.)
A. Add the content authors to the Administrators site group.
B. Add the content authors to the Quick Deploy site group.
C. Execute the QuickDeploy method of the PublishingPage object that references the pages of the content
authors.
D. Set the Audience property of the PublishingPage object for the pages of the content authors to an
audience that contains the content authors.
Answer: BC
41. You create a Microsoft Office SharePoint Server 2007 site that contains a document library named
Reports. You create a Web Part that displays an audit trail for each document in the Reports library.
You need to audit the dates and types of each document that was printed by a specific user. Which two
actions should you perform? (Each correct answer presents part of the solution. Choose two.)
A. Implement the IRouter interface.
B. Implement the IPolicyFeature interface.
C. Implement the IProfileEventInterface interface.
D. Install a valid Policy Feature Definition into the Policy Feature Definition list.
E. Install a valid Policy Resource Definition into the Policy Feature Definition list.
Answer: BD
42. You create a Microsoft Office SharePoint Server 2007 portal site. The site contains a document
retention policy for request for proposal (RFP) documents. You need to customize the policy to ensure
that a notification is sent to each project manager when the RFP date expires. What should you do?
A. Implement a custom IPolicyFeature.OnCustomDataChange method that generates an e-mail message.
B. Implement a custom IPolicyFeature.ProcessListItemOnRemove method that generates an e-mail
message.
C. Create a document retention workflow that monitors the expiration date of RFP documents and
generates an e-mail message.
D. Extend the built-in policy feature definition to use a custom policy resource expiration action that
generates an e-mail message.
Answer: D
43. You install a Microsoft Office SharePoint Server 2007 server. The server contains three site collections.
One site collection uses both English and Turkish language variations. You need to redirect a user to the
selected language page. You also need to ensure that the language settings for other site collections
remain unaffected. Which two files should you customize for the site collection? (Each correct answer
presents part of the solution. Choose two.)
A. VariationLogs.aspx
Testinside
TestInside Help You Pass Any IT Exam http://www.testinside.com/
B. VariationsLabelMenu.ascx
C. VariationsRootLanding.ascx
D. PublishingContentTypes.xml
E. VariationRootPageLayout.aspx
Answer: CE
44. Your company uses a portal site template to recreate site hierarchies. You need to add additional
sites to the hierarchy that is defined in the portal site template. What should you do?
A. In the Webtemp*.xml file, add a Template element that contains the site definitions for the new sites.
B. Add additional Web elements to the XML definition file of the portal site template.
C. Add additional Webtemp*.xml files to C:\Program Files\Common Files\Microsoft Shared Debug\Web
Server Extensions\12\TEMPLATE\1033\XML.
D. Update an existing site to include the new hierarchy and create a new site template on the Site Settings
page.
Answer: B
45. You create a Microsoft Office SharePoint Server 2007 site.
You are creating a custom field control that displays a video.
The custom field must perform the following tasks:
Render the control properly when the page is in display mode.
Enable a user to select an appropriate video for display when the page is in edit mode.
You need to ensure that the custom field meets the outlined requirements.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
A. Create a field control that inherits from the RichLinkField class.
B. Create a field control that inherits from the BaseRichSelector class.
C. Create a field control that inherits from the SummaryLinkField class.
D. Create a field control that inherits from the RichTextHighlightTextbox class.
Answer: AB
46. Your companys sales database has two related tables named Customer and SalesOrders.
You define two entities named Customer and SalesOrders in a Business Data Catalog (BDC) definition.
The metadata for the BDC definition contains the following XML fragment. (Line numbers are included for
reference only.)
01 <Associations>
02 <Association>
03 <
04 Association
05 AssociationMethodEntityName="Customer"
Testinside
TestInside Help You Pass Any IT Exam http://www.testinside.com/
06 AssociationMethodName="GetSalesOrdersForCustomer"
07 AssociationMethodReturnParameterName="SalesOrders"
08 Name="CustomerToSalesOrder"
09 IsCached="true"
10 >
11 ...
12 </Association>
13 </Associations>
You need to maintain the relationship between the entities.
Which XML fragment should you insert at line 11?
A. <SourceEntity Name="Customer" />
<DestinationEntity Name="CustomerToSalesOrder" />
B. <SourceEntity Name="Customer" />
<DestinationEntity Name="SalesOrders" />
C. <SourceEntity Name="Customer" />
<DestinationEntity Name="GetSalesOrdersForCustomer" />
D. <SourceEntity Name="Customer" />
<DestinationEntity Name="Customer" />
Answer: B
47. You are creating a Business Data Catalog (BDC) definition for a phone book application. The
application stores customer names in a table named People in a Microsoft SQL Server database. You
are defining an entity named People within the BDC definition. You need to ensure that the entity data
can be displayed in a Business Data List (BDL) Web Part. Which method should you define inside the
entity?
A. Finder
B. ViewAccessor
C. IDEnumerator
D. GenericInvoker
Answer: A
48. 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?
A. Create a GenericInvoker method.
B. Create a Finder method.
C. Create a ViewAccessors method to return a different set of fields from the database.
Testinside
TestInside Help You Pass Any IT Exam http://www.testinside.com/
D. Define an IDEnumerator method that has a return field that represents the last update time of the
database.
Answer: D
49. You create an application for a Microsoft Office SharePoint Server 2007 server. You create a List
Web Part that displays tasks in a project plan. The Web Part retrieves information from the Business Data
Catalog (BDC) definition. You need to ensure that when a user selects an item in the project list, the task
list for the project is displayed. You also need to ensure that users can update information in the task list.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
A. Remove any definitions for the SpecificFinder method.
B. Create a property in the BDC definition that maps to the task ID.
C. Create a custom field for the list named task ID that holds the URL of the Web page.
D. Create an entity based on the BDC definition, and create a custom action that adds the value of the
current task ID property to a placeholder in the URL of the desired Web page.
Answer: BD
50. Your company uses an external CRM application that contains a business object named Customers.
The Customers object represents a table that contains customer details. You need to define the
Customers object in the Business Data Catalog (BDC) definition. What should you do?
A. Create an Entity element named Customers.
B. Create a Method element named GetCustomers.
C. Add a Parameter element that has the Direction property set to In and the Name property set to
@Customers.
D. Modify the Action element by adding an ActionParameter element that has the Name property set to
@Customers and the Index property set to 0.
Answer: A
51. You create a Microsoft Office SharePoint Server 2007 site. You also create a Business Data Catalog
(BDC) definition. The BDC definition accesses a product database that is stored on a Microsoft SQL Server
2005 server. You need to ensure that users can filter the product data by the ProductType field from
within the SharePoint server. What should you do?
A. Create a custom action that passes the product type to the BDC definition.
B. Create an IDEnumerator method that filters the data by the ProductType field.
C. Create a Filter Descriptor object that passes the ProductType field value as a parameter.
D. Create a type descriptor within the BDC definition for which ProductType is the type name.
Answer: C
52. Your Microsoft SQL Server 2005 database contains client records. You create a Business Data Catalog
(BDC) definition that allows you to view the client information. You create a Web Part that displays a map
Testinside
TestInside Help You Pass Any IT Exam http://www.testinside.com/
of the location of the selected client. You need to ensure that you can create a custom action to link to
theWeb part. Which two actions should you perform? (Each correct answer presents part of the solution.
Choose two.)
A. Define a filter on the Client entity.
B. Declare an identifier for the Client entity.
C. Define a Finder object on the Client entity.
D. Define a SpecificFinder object on the Client entity.
Answer: BD
53. Your company uses an order management application that stores order information in a Microsoft SQL
Server 2005 database. You are creating a Business Data Catalog (BDC) definition on a Microsoft Office
SharePoint Server 2007 server. You need to ensure that the SharePoint server can index the order
information. Which two actions should you perform? (Each correct answer presents part of the solution.
Choose two.)
A. Define a Finder method in the BDC definition.
B. Define an IDEnumerator method in the BDC definition.
C. Define a ViewAccessors method in the BDC definition.
D. Define a SpecificFinder method in the BDC definition.
Answer: BD
54. You are creating a Business Data Catalog (BDC) definition for a bookstore application.
The application stores information about books in a Microsoft SQL Server 2005 database table named
Books.
You need to retrieve all the book names from the Books table.
Which XML fragment should you use?
A. <Entity Name="GetBooks">
<Properties>
<Property Name="Title" Type="System.String">
Books
</Property>
<Property Name="DefaultAction" Type="System.String">
SELECT * FROM Books
</Property>
</Properties>
</Entity>
B. <Method Name=" GetBooks ">
<Properties>
Testinside
TestInside Help You Pass Any IT Exam http://www.testinside.com/
<Property Name=" RdbCommandText "
Type=" System.String ">SPGetBooks</Property>
<Property Name=" RdbCommandType "
Type=" System.String ">StoredProcedure</Property>
</Properties>
<!-- Additional information goes here -->
</Method>
</Methods>
C. <Parameter Direction="In" Name="GetBooks">
<TypeDescriptor Name="CommandText" TypeName=""System.String""
IdentifierName="SELECT * FROM Books" />
<TypeDescriptor TypeName="System.Int32" IdentifierName="Books"
AssociatedFilter="ID" Name="BookId" />
</Parameter>
D. <Action Name="GetBooks" Position="1">
<ActionParameters>
<ActionParameter Name="CommandText" Index="0">
SELECT * FROM Books
</ActionParameter>
<ActionParameter Name="CommandType" Index="0">
SQLQuery
</ActionParameter>
</ActionParameters>
</Action>
Answer: B
55. You have two Microsoft Office SharePoint Server 2007 site collections named Staging and Production.
The Staging site collection runs on Server A. The Production site collection runs on Server B. Server A and
Server B are located on separate networks. You need to write a script that replicates content from the
Staging site collection to the Production site collection. What should you do ? (To answer, move the
appropriate three actions from the list of actions to the answer area and arrange them in the correct order.)
Testinside
TestInside Help You Pass Any IT Exam http://www.testinside.com/
Answer:
56. You create a Microsoft Office InfoPath workflow task form for users. The form contains all the details of
each task. You need to store the value of the Comments field in a variable named UserInput when each
user submits the form. Which code segment should you use?
A. String UserInput = new String();
SPWorkflowTaskProperties wpTProps =
new SPWorkflowTaskProperties();
...
UserInput = wpTProps.ExtendedProperties["Comments"].ToString();
B. SPWorkflowActivationProperties wpAProps =
new SPWorkflowActivationProperties();
...
object UserInput = wpAProps.Item.Fields["Comments"];
C. SPWorkflowActivationProperties wpAProps =
Testinside
TestInside Help You Pass Any IT Exam http://www.testinside.com/
new SPWorkflowActivationProperties();
XmlSerializer serializer = new XMLSerializer(typeof(MyFields));
xmlTextReader reader = new XMLTextReader
(new System.IO.StringReader(wpAProps.InitiationData));
MyFields fields = serializer.Deserialize(reader);
String UserInput = fields.Users[i].Comments;
D. XmlSerializer serializer = new XmlSerializer(typeof(InitForm));
XmlTextReader reader = new XmlTextReader
(new System.IO.StringReader(workflowProps.InitiationData));
InitForm initform = (InitForm) serializer.Deserialize(reader);
String UserInput = initform.comments;
Answer: A
57. 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?
A. private void RetrieveColleagues(ServerContext Cntxtobj)
{
...
SPSite site = new SPSite("http: //servername/sites/site1");
UserProfileManager profileManager =
new UserProfileManager( Cntxtobj );
UserProfile profile =
profileManager.GetUserProfile("abc\\UserA");
Colleague[] colleagues = profile.Colleagues.GetItems();
Site.Dispose();
...
}
B. private void RetrieveColleagues(ServerContext Cntxtobj)
{
...
SPSite site = new SPSite("http: //servername/sites/site1");
ServerContext context = ServerContext.GetContext(site);
UserProfileManager profileManager =
new UserProfileManager(context);
UserProfile profile =
Testinside
TestInside Help You Pass Any IT Exam http://www.testinside.com/
profileManager.GetUserProfile("abc\\UserA");
UserProfile[] colleagues =
profile.Colleagues.GetCommonColleagues();
Site.Dispose();
...
}
C. private void RetrieveColleagues(ServerContext Cntxtobj)
{
...
SPSite site = new SPSite("http: //servername/sites/site1");
ServerContext context = ServerContext.GetContext(site);
UserProfileManager profileManager =
new UserProfileManager(context);
UserProfile profile =
profileManager.GetUserProfile("abc\\UserA");
ColleagueManager manager = new ColleagueManager(profile);
UserProfile[] profiles = manager.GetColleaguesOfColleagues();
Site.Dispose();
...
}
D. private void RetrieveColleagues(ServerContext Cntxtobj)
{
...
SPSite site = new SPSite("http: //servername//sites/site1");
ServerContext context = ServerContext.GetContext(site);
AudienceManager audMgr = new AudienceManager(context);
SPWeb web = site.AllWebs ["mainpage"] ;
ArrayList audienceIDNames =
audMgr .GetUserAudienceIDs("domain\\userA", true, web);
Site.Dispose();
...
}
Answer: A
58. You are creating a Microsoft Office SharePoint Server 2007 site. You create a Microsoft WinForms
application to enter information about a user.
Testinside
TestInside Help You Pass Any IT Exam http://www.testinside.com/
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?
A. UserProfile u = profileManager.GetUserProfile(user_name);
...
B. UserProfileManager profileManager =
new UserProfileManager(context);
UserProfile u = profileManager.GetUserProfile(user_name);
...
u.Commit ();
C. string user_name = "<UserProfile>";
...
user_name += userProfile + user_name;
...
user_name += "</UserProfile>";
profileManager.CreateUserProfile ( user_name );
D. UserProfile u = profileManager.CreateUserProfile(user_name);
...
u.Commit ();
Answer: D
59. You are creating a Business Data Catalog (BDC) definition for a bookstore application.
The application stores information about books in a Microsoft SQL Server 2005 database table named
Books.
Testinside
TestInside Help You Pass Any IT Exam http://www.testinside.com/
You need to retrieve all the book names from the Books table.
Which XML fragment should you use?
A. <Entity Name=" GetBooks ">
<Properties>
<Property Name="Title" Type=" System.String ">
Books
</Property>
<Property Name=" DefaultAction " Type=" System.String ">
SELECT * FROM Books
</Property>
</Properties>
</Entity>
B. <Method Name=" GetBooks ">
<Properties>
<Property Name=" RdbCommandText "
Type=" System.String "> SPGetBooks </Property>
<Property Name=" RdbCommandType "
Type=" System.String "> StoredProcedure </Property>
</Properties>
<!-- Additional information goes here -->
</Method>
</Methods>
C. <Parameter Direction="In" Name=" GetBooks ">
< TypeDescriptor Name=" CommandText " TypeName ="" System.String ""
IdentifierName ="SELECT * FROM Books" />
< TypeDescriptor TypeName ="System.Int32" IdentifierName ="Books"
AssociatedFilter ="ID" Name=" BookId " />
</Parameter>
D. <Action Name=" GetBooks " Position="1">
< ActionParameters >
< ActionParameter Name=" CommandText " Index="0">
SELECT * FROM Books
</ ActionParameter >
< ActionParameter Name=" CommandType " Index="0">
SQLQuery
Testinside
TestInside Help You Pass Any IT Exam http://www.testinside.com/
</ ActionParameter >
</ ActionParameters >
</Action>
Answer: B
60. You are creating a Microsoft Office SharePoint Server 2007 site.
The site has five audiences. A user might belong to more than one of the five audiences.
You need to obtain a list of audience names for the current user.
Which code segment should you use?
A. private void ListAudienceNames()
{
...
AudienceLoader al = AudienceLoader.GetAudienceLoader();
AudienceManager am = am.CurrentServerContext;
ArrayList audiences = al.GetUserAudienceIDs(true);
foreach (object audience in audiences)
{
Audience a = am.Audiences[(Guid)audience];
System.Web.HttpContext.Current.Response.Write
("Audience: " + audience.ToString());
}
...
}
B. private void ListAudienceNames()
{
...
using (SPWeb web = SPWeb.OriginalBaseUrl )
{
SPUser user = web.CurrentUser;
AudienceManager am = am.CurrentServerContext;
AudienceCollection audiences = am.Audiences;
foreach (Audience a in audiences)
{
if (a.IsMember(user.LoginName))
System.Web.HttpContext.Current.Response.Write
("Audience: " + AudienceName);
Testinside
TestInside Help You Pass Any IT Exam http://www.testinside.com/
}
}
...
}
C. private void ListAudienceNames()
{
...
string user = WindowsIdentity.GetCurrent().Name;
SPWeb web = SPWeb.OriginalBaseUrl;
AudienceManager am = am.CurrentServerContext;
ArrayList audList = am.GetUserAudienceIDs(user, false, web);
foreach (object obj in audList)
{
Audience a = (Audience)obj;
System.Web.HttpContext.Current.Response.Write
("Audience: " + a.AudienceName);
}
...
}
D. private void ListAudienceNames()
{
...
using (SPWeb web = SPWeb.OriginalBaseUrl )
{
string user = web.CurrentUser.Name;
AudienceManager am = am.CurrentServerContext;
foreach (Audience a in am.Audiences)
{
if (am.IsMemberOfAudience(user, a.AudienceName))
System.Web.HttpContext.Current.Response.Write
("Audience: " + a.AudienceName);
}
}
...
}
Testinside
TestInside Help You Pass Any IT Exam http://www.testinside.com/
Answer: BD
61. You are creating a Microsoft Office SharePoint Server 2007 site. An audience named Purchasing
contains all the users in a Microsoft Active Directory group.
You need to display the name of each member of the audience.
Which code segment should you use?
A. AudienceManager audManager = new AudienceManager();
Audience aud = audManager.Audiences["Purchasing"];
ArrayList members = aud.GetMembership();
foreach (object obj in members) {
UserInfo user = (UserInfo)obj;
System.Web.HttpContext.Current.Response.Write("User: {0}" +
user.PreferredName);
}
B. AudienceManager audManager = new AudienceManager();
AudienceCollection members = audManager.Audiences;
foreach (Audience obj in members) {
string user =
System.Security.Principal.WindowsIdentity.GetCurrent().Name;
if (obj.IsMember(user))
System.Web.HttpContext.Current.Response.Write("User: {0}" + user);
}
C. AudienceManager audManager = new AudienceManager();
AudienceCollection audCol = audManager.Audiences;
Audience aud = audManager.Audiences["Purchasing"];
ArrayList members = aud.GetMembership();
foreach (object obj in audCol) {
UserInfo user = (UserInfo)members[audCol.Count];
System.Web.HttpContext.Current.Response.Write("User: {0}" +
user.PreferredName);
}
D. Audience_List members = new Audience_List();
AudienceManager audManager = new AudienceManager();
Audience aud = audManager.Audiences["Purchasing"];
members.GetData();
members.DataBind();
Testinside
TestInside Help You Pass Any IT Exam http://www.testinside.com/
Answer: A
62. 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?
A. AudienceManager audMgr = new AudienceManager();
AudienceCollection audiences = audMgr.Audiences;
Audience audience1 = audiences["Audience1"];
B. AudienceManager audMgr = new AudienceManager();
ArrayList membershipList =
audMgr.Audiences["Audience1"].GetMembership();
C. AudienceManager audMgr = new AudienceManager();
AudienceCollection audience1 = audMgr.Audiences;
D. SPSite site = new SPSite("http: //servername//sites/site1");
ServerContext context = ServerContext.GetContext(site);
AudienceManager audMgr = new AudienceManager(context);
SPWeb web = site.AllWebs[0];
ArrayList audienceIDNames =
audMgr.GetUserAudienceIDs("Audience1", true, web);
Answer: B
63. 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?
A. string strSite = "http: //yourSiteName" SearchContext
srchContext = SearchContext.GetContext(new SPSite(strSite));
B. SearchContext srchContext = SearchContext.
GetContext(ServerContext.Current);
C. SearchService searchservice = new
SearchService("Search_SSPS Name", SPFarm.Local);
SearchContext srchContext = SearchContext.
GetContext(searchservice.Id.ToString());
D. WASearchWebService1.SPSSearchWS.QueryService searchWebService
new WASearchWebService1.SPSSearchWS.QueryService();
searchWebService.Url = " http: // myportal";
Sea rchContext srchContext = SearchContext.GetContext(new
Testinside
TestInside Help You Pass Any IT Exam http://www.testinside.com/
SPSite(searchWebService.ToString()));
Answer: B
64. You are creating a Microsoft Office SharePoint Server 2007 Web Part.
You write the following code segment. (Line numbers are included for reference only.)
01 public Button cmdCrawl;
02 protected override void CreateChildControls()
03 {
04 cmdCrawl = new Button();
05 cmdCrawl.Click += new EventHandler(cmdCrawl_Click);
06 cmdCrawl.Text = "Update Index";
07 }
08 public void cmdCrawl_Click(object sender, EventArgs e)
09 {
10 Microsoft.Office.Server.Search.Administration.Content sspContent =
11 new Microsoft.Office.Server.Search.Administration.Content
12 (SearchContext.Current);
13 ...
14 }
You need to ensure that the Web Part initiates a search crawl of a scope named Patents.
Which code segment should you insert at line 13?
A. ContentSourceCollection sspContentSources =
sspContent.ContentSources;
ContentSource cs = sspContentSources["Patents"];
cs.StartFullCrawl();
B. ContentSourceCollection sspContentSources =
sspContent.ContentSources;
Uri TargetScope = new
Uri("http: //myportal/SearchCenter/Search.aspx?Scope=Patents");
sspContentSources.Update(TargetScope);
C. ContentSourceCollection sspContentSources =
sspContent.ContentSources;
CrawlMappingCollection crawlmappings =
sspContentSources.Parent.CrawlMappings;
Uri ResultsPage = new Uri(this.Context.ToString());
Uri TargetScope = new
Testinside
TestInside Help You Pass Any IT Exam http://www.testinside.com/
Uri("http: //myportal/SearchCenter/Search.aspx?Scope=Patents");
crawlmappings.Create(ResultsPage, TargetScope);
D. ContentSourceCollection sspContentSources =
sspContent.ContentSources;
ContentSource cs = sspContentSources["Patents"];
cs.Update();
Answer: A
65. You are creating a Microsoft Office SharePoint Server 2007 application that uses the Search service.
You need to ensure that the search results are based on an existing keyword. Which code segment
should you use?
A. private void keywordQueryExecute(string strQueryText) {
...
KeywordQuery kRequest =
new KeywordQuery(ServerContext.Current);
kRequest.QueryText = strQueryText;
kRequest.ResultTypes |= ResultType.RelevantResults;
ResultTableCollection resultTbls = kRequest.Execute();
...
}
B. private void keywordQueryExecute(string strQueryText) {
...
KeywordQuery kRequest =
new KeywordQuery(ServerContext.Current);
kRequest.QueryText =
"SELECT * FROM scope() WHERE keyword = " + strQueryText;
kRequest.ResultTypes |= ResultType.RelevantResults;
ResultTableCollection resultTbls = kRequest.Execute();
...
}
C. private void keywordQueryExecute(string strQueryText) {
...
KeywordQuery kRequest =
new KeywordQuery(ServerContext.Current);
kRequest.QueryText =
"SELECT * FROM scope(" + strQueryText + ")";
Testinside
TestInside Help You Pass Any IT Exam http://www.testinside.com/
kRequest.ResultTypes |= ResultType.RelevantResults;
ResultTableCollection resultTbls = kRequest.Execute();
...
}
D. private void keywordQueryExecute(string strQueryText) {
...
KeywordQuery kRequest =
new KeywordQuery(ServerContext.Current);
kRequest.QueryText =
"SELECT " + strQueryText + " FROM scope()";
kRequest.ResultTypes |= ResultType.RelevantResults;
ResultTableCollection resultTbls = kRequest.Execute();
...
}
Answer: A

转载于:https://www.cnblogs.com/Little-Li/archive/2010/04/14/1711944.html

没有更多推荐了,返回首页