1.A farm environment has multiple servers that run
Microsoft Windows SharePoint Services. You create a new
feature named myFeature.
You need to deploy and activate myFeature for the http:
//www.contoso.local site.
Which three actions should you perform? (Each correct
answer presents part of the solution. Choose three.)
A:Run the IISReset command on one server in the farm.
B:Run the IISReset command on each server in the farm.
C:Run the stsadm o activatefeature name myFeature url
http: //www.contoso.local command on one server in the
farm.
D:Run the stsadm o activatefeature name myFeature url
http: //www.contoso.local command on each server in the
farm.
E:Copy the feature files to the correct directory on
one server in the farm. Run the stsadm o installfeature
name myFeature command on that server.
F:Copy the feature files to the correct directory on
each server in the farm. Run the stsadm o
installfeature name myFeature command on each server in
the farm.
Correct Answers: B, C, F 70-272 70-293 70-297
2.You are creating a Microsoft Windows SharePoint
Services application.
You write the following code segment. (Line numbers are
included for reference only.)
01 Public Sub DownloadDocument ( ByVal web As SPWeb )
02 Dim docLib As SPDocumentLibrary = _
CType ( web.Lists ("shared Documents"),
SPDocumentLibrary )
03 Const fil eShare As String = "C:\Download"
04 ...
05 End Sub
You need to move each document to the C:\Download
folder. You also need to remove each document from the
document library.
Which code segment should you insert at line 04?
A: For Each folder As SPFolder In docLib.Folders
folder.MoveTo ( fileShare )
Next
B: For Each item As SPListItem In docLib.Items
Dim targetPath As String = Path.Combine ( fileShare ,
item.File.Name )
item.File.MoveTo ( targetPath )
Next
C: For Each item As SPListItem In docLib.Items
If item.File.Exists Then
Dim targetPath As String = Path.Combine ( fileShare
, item.File.Name )
item.File.MoveTo ( targetPath )
End If
Next
D: For Each item As SPListItem In docLib.Items
Dim targetPath As String = Path.Combine ( fileShare ,
item.File.Name )
' Using
Dim stream As FileStream = _
New FileStream ( targetPath , FileMode.Create )
Try
stream.Write ( item.File.OpenBinary (), 0, _
CType ( item.File.Length , Integer))
Finally
CType (stream, IDisposable ).Dispose()
End Try
item.Delete ()
Next.
Correct Answers: D 70-433 70-450 70-536
3.You create a Microsoft Windows SharePoint Services
site that contains task lists.
You are creating a custom Search Web Part that displays
the number of unassigned tasks on the site.
You need to retrieve a list of task items from within
the Web Part for which the assignment field is empty.
What should you do?
A: Create an instance of the FullTextSqlQuery class and
pass a SQL string to the QueryText property.
B: Create an instance of the KeywordQuery class and set
the QueryText property to the value AssignedTo.
C: Create an instance of the SPQuery class and pass a
Collaborative Application Markup Language (CAML) string
to the query property. Iterate through the task lists
on the site and pass the query property to the
SPList.GetItems method.
D: Create an instance of the SPQuery class and pass a
Collaborative Application Markup Language (CAML) string
to the query property. Iterate through the task lists
on the site and pass the SPQuery object to the
SPList.GetItems method.
Correct Answers: D
4.You create a Microsoft Windows SharePoint Services
site that contains a content type named Proposal. The
Proposal content type is applied to lists that are
named within the site collection.
You need to update the Proposal content type to include
a new column. You also need to ensure that the existing
lists display the new column.
What should you do?
A: Modify the Proposal content type to include the new
column, and then push down the change to all content
types that inherit the Proposal content type.
B: Modify the Proposal content type to include the new
column, and then write code to install and activate the
content type on all sites in the site collection.
C: Modify the Proposal content type to include the new
column, and then write code to add the column to all
lists to which the Proposal content type is applied.
D: Create a new content type that is based on the
Proposal content type and contains the new column.
Deploy the new content type to all sites that use the
Proposal content type, and then move the Proposal
content type to the _Hidden content type group.
Correct Answers: A
5.You are creating a Microsoft Windows SharePoint
Services application.
Your organization plans to create a custom version of
the site definition of the Team site and make the
custom version available to all site owners.
You need to ensure that the customizations are retained
when the Windows SharePoint Services updates are
applied.
What should you do?
A: Rename the existing site definition of the Team
site.
B: Customize the existing site definition of the Team
site.
C: Create a custom template that is based on an
instance of the Team site.
D: Create and customize a new copy of the existing site
definition of the Team site.
Correct Answers: D MB6-820 VCP-310 642-453
6.You define a custom field type. You override the
GetValidatedString() method in the custom field type.
You implement the custom field type in a list. In some
scenarios, the data in the list is updated without the
GetValidatedString() method being called.
You need to identify the scenario in which the
GetValidatedString() method is called.
When is the GetValidatedString() method called?
A: When the user adds or updates the data in the data
sheet view
B: When the user adds or updates the data by using the
Web form interface
C: When an application adds or updates the data through
Web services
D: When an application adds or updates the data through
the object model
E: When the user adds or updates the data in Microsoft
Office Access that is connected to the Microsoft
Windows SharePoint Services list
Correct Answers: B
7.You are creating a Microsoft Windows SharePoint
Services application.
You need to display the custom site navigation of your
company in a site definition.
Which file should you modify?
A: Onet.xml
B: Schema.xml
C: VWStyles.xml
D: WebTemp.xml
Correct Answers: A
8.You are creating a Microsoft Windows SharePoint
Services application that uses a tasks list.
The application must notify the project manager each
time a new task is inserted into the tasks list. You
write an event receiver in the class named
TaskEventClass and compile the class in the assembly
named TaskEventAssembly.
You need to register the event receiver. You also need
to ensure that the event receiver is fired only when an
item is added to the tasks list.
Which code segment should you use?
A: Public Sub AddEventReceiver(ByVal web As SPWeb)
web.EventReceivers.Add(SPEventReceiverType.ItemAdded,
_
"TaskEventAssembly", "TaskEventClass")
End Sub
B: Public Sub AddEventReceiver(ByVal web As SPWeb)
web.Lists("Tasks").EventReceivers.Add
(SPEventReceiverType._
ItemAdded, "TaskEventAssembly", "TaskEventClass")
End Sub
C: Public Sub AddEventReceiver(ByVal web As SPWeb)
Dim list As SPList = web.Lists("Tasks")
list.EventSinkAssembly = "TaskEve ntAssembly"
list.EventSinkClass = "TaskEventClass"
list.EventSinkData =
SPEventReceiverType.ItemAdded.ToString
End Sub
D: Public Sub AddEventReceiver(ByVal web As SPWeb)
Dim list As SPList = web.Lists("Tasks")
Dim eventHandler As
SPEventReceiverDefinitionCollection = _
web.EventReceivers
eventHandler.Add(SPEventReceiverType.ItemAdded, _
"TaskEventAssembly", "TaskEventClass")
End Sub
Correct Answers: B
9.You create a Microsoft Windows SharePoint Services
application. Your company creates two SharePoint sites
named Site1 and Site2 in the same Web application.
You write the following code segment.
Private site1 As SPWeb = _
(New SPSite("http: //localhost/Site1")).OpenWeb()
Private site2 As SPWeb = _
(New SPSite("http: //localhost/Site2")).OpenWeb()
You need to copy a custom cross-site group named
CrossSite from Site1 to Site2.
Which code segment should you use?
A: Dim CrossSite As SPRoleDefinition = New
SPRoleDefinition()
site2.RoleDefinitions.Add(CrossSite)
B: Dim CrossSite As SPRoleDefinition = _
site1.RoleDefinitions("CrossSite")
site2.RoleDefinitions.Add(CrossSite)
C: Dim CrossSite As SPRoleDefinition = _
site1.RoleDefinitions("CrossSite")
For Each role As SPRoleDefinition In
site1.RoleDefinitions
If CrossSite.Type.ToString() = "CrossSite" Then
site2.RoleDefinitions.Add(CrossSite)
End If
Next
D: Dim roles As SPRoleDefinitionCollection = _
site1.RoleDefinitions
Dim CrossSite As SPRoleDefinition = New
SPRoleDefinition()
roleDefinition.BasePermissions = SPBasePermissions._
AddListItems Or SPBasePermissions.BrowseDirectories Or
_
SPBasePermissions.EditListItems
CrossSite.Description = "CrossSite Group"
CrossSite.Name = "CrossSite Group"
roles.Add(CrossSite)
Correct Answers: B
10.You create a Microsoft Windows SharePoint Services
site and a custom workflow definition. The workflow
must be associated with a custom list.
You need to display a form named Workflow1.aspx to the
site administrator when the site administrator
associates the workflow with a custom list.
Which XML fragment should you add to the workflow
definition schema?
A: < Workflow
Name=" myWorkflow "
CodeBesideClass ="myWorkflow.Workflow1"
InstantiationUrl ="_layouts/Workflow1.aspx" >
< /Workflow >
B: < Workflow
Name=" myWorkflow "
CodeBesideClass ="myWorkflow.Workflow1"
StatusUrl ="_ layouts /Workflow1.aspx" >
< /Workflow >
C: < Workflow
Name=" myWorkflow "
CodeBesideClass ="myWorkflow.Workflow1" >
< AssociationData > _layouts/Workflow1.aspx < /
AssociationData >
< /Workflow >
D: < Workflow
Name=" myWorkflow "
CodeBesideClass ="myWorkflow.Workflow1"
AssociationUrl ="_layouts/Workflow1.aspx" >
< /Workflow >
Correct Answers: D