Microsoft 70-573 Real Exam Questions

This exam is designed to test the candidate’s knowledge and skills on developing applications on the Microsoft SharePoint Server 2010 platform.

QUESTION NO: 1
You use a third-party site definition to create SharePoint sites. You need to add a Web Part to the home page of the site definition. Which file should you modify?

A. default.master
B. Onet.xml
C. Sp.xml
D. web.config
Answer: B

QUESTION NO: 2.
You have a custom site definition. You create a custom site Feature. You need to ensure that the Feature is activated for all new sites that are created by using the custom site definition. What should you do?

A. Modify the Onet.xml file.
B. Modify the web.config file.
C. Add a Feature receiver to the custom site Feature.
D. Add a Feature dependency to the custom site Feature.
Answer: A

QUESTION NO: 3.
You create a custom site definition named DCS. You create a site provision handler for DCS. DCS contains a file named DCSTemplate.xsd that stores configuration data. You need to read the content of DCSTemplate.xsd in the site provision handler. Which property should you use?

A. SPSite.GetCustomWebTemplates(1033)["DCS"].ProvisionClass
B. SPWebApplication.DataRetrievalProvider
C. SPWebProvisioningProperties.Data
D. SPWebProvisioningProperties.Web.DataRetrievalServicesSettings
Answer: C

QUESTION NO: 4.
You create custom code to import content to SharePoint sites. You create a custom site definition by using Microsoft Visual Studio 2010. You need to ensure that when a new site that uses the site definition is created, the custom code executes after the site is created.
Which class should you add to the project?

A. SPChangeFile
B. SPItemEventReceiver
C. SPWebEventReceiver
D. SPWebProvisioningProvider
Answer: D

QUESTION NO: 5.
You create a custom Web Part. You need to verify whether the Web Part causes any memory leaks. Which tool should you use?

A. SPDisposeCheck.exe
B. SPMetal.exe
C. Wca.exe
D. WinDbg.exe
Answer: A

QUESTION NO: 6.
You are creating a Web Part that will be deployed as a sandboxed solution. You need to ensure that the Web Part can write debugging information to the SharePoint trace logs. Which class should the logging component inherit?

A. SPDelegate
B. SPLog
C. SPPersistedObject
D. SPProxyOperation
Answer: D

QUESTION NO: 7.
You update a solution validator. You need to ensure that all SharePoint solutions are validated the next time the solutions are executed. What should you do?

A. Modify the Guid attribute of the solution validator.
B. Deactivate and activate all of the installed solutions.
C. Modify the Signature property of the solution validator.
D. In the Feature that deploys the solution validator, modify the Version attribute of the Feature element.
Answer: C

QUESTION NO: 8.
You are creating a Web Part. The Web Part will be used in a SharePoint subsite that has the URL http://www.contoso.com/hr.You need to ensure that the Web Part activates a Feature in the subsite without causing a memory leak.Which code segment should you use?
A. Dim featuresCollect As SPFeatureCollection = SPContext.Current.SiteFeatures
featuresCollect.Add(New Guid("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),True)
B. Dim featuresCollect As SPFeatureCollection = SPContext.Current.WebFeatures
featuresCollect.Add(New Guid("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),True)
C. Dim web As New SPSite("http://www.contoso.com/hr")
Dim featureCollect As SPFeatureCollection = web.Features
featureCollect.Add(New Guid("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),True)
D. Dim web As SPWeb = New SPSite("http://www.contoso.com/hr").OpenWeb()
Dim featureCollect As SPFeatureCollection = web.Features
featureCollect.Add(New Guid("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),True)
Answer: B

QUESTION NO: 9.
You create a Web Part that takes three values from three text boxes and creates a new SharePoint site when you click a button named CreateNewSite. The Web Part contains the following code segment.

Protected Sub CreateNewSite_Click(ByVal sender As Object, ByVal e As EventArgs)
Dim site As SPSite = SPContext.Current.Site
Dim web As SPWeb = site.AllWebs.Add(SiteNameTextBox.Text, SiteTitleTextBox.Text,
SiteDescriptionTextBox.Text, 0, SPWebTemplate.WebTemplateSTS, False, _False)
End Sub
You test the Web Part and it works properly. When another user attempts to use the Web Part to create a new site, he receives the following error message: “Error: Access Denied.”
You need to ensure that users can use the Web Part to create new sites. What should you do?

A. Add web.Update() after the code segment.
B. Add web.ValidatesFormDigest() after the code segment.
C. Run the code segment inside a SPSecurity.RunWithElevatedPrivileges delegate.
D. Add the following code after the code segment.
Dim currentUser As SPUser = web.CurrentUser
web.Users.Add(currentUser.LoginName, currentUser.Email, currentUser.Name, "")
Answer: C

QUESTION NO: 10.
You have a SharePoint site collection that contains 100 subsites. You plan to create a Web Part. The Web Part will be deployed to each subsite. You need to ensure that the Web Part retrieves all of the files in the root directory of the current subsite. You write the following code segment. (Line numbers are included for reference only.)
01Dim site As SPSite = SPContext.Current.Site
02Dim web As SPWeb = SPContext.Current.Web
03
Which code segment should you add at line 03?

A. site.AllWebs[1].Files
B. Site.RootWeb.Lists[0].Items
C. web.Files
D. web.RootFolder.SubFolders[0].Files web.Users.Add(currentUser.LoginName, currentUser.Email,
currentUser.Name, "")
Answer: C

Download  |  Password: certificatexam.com