Microsoft TS: Office SharePoint Server, Application Development (available in 2010) - 070-573 Exam Practice Test

You create a timer job.
You need to debug the timer job.
To which process should you attach the debugger?
Correct Answer: D Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
You are creating an application for SharePoint Server 2010.
The application will run on a remote computer.
You need to identify a data access method to query lists in the application.
Strongly-typed access to columns must be provided from within Microsoft Visual Studio 2010.
Which method should you use?
Correct Answer: D Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
You have a document library named Documents. Minor and major version management is enabled for the document library.
You plan to add a document named MyFile.docx to Documents.
You create a console application that contains the following code segment. (Line numbers are included for reference only.)
01 using (SPSite site = new SPSite("http://intranet"))
02 {
03 SPList documents = site.RootWeb.Lists["Documents"];
04 FileStream fstream = File.OpenRead(@"MyFile.docx");
05 byte[] content = new byte[fstream.Length];
06 fstream.Read(content, 0, (int)fstream.Length);
07 fstream.Close();
08 site.RootWeb.Files.Add(documents.RootFolder.Url + "/MyFile.docx", content,
true);
09 SPFile file = site.RootWeb.GetFile(documents.RootFolder.Url + "/
MyFile.docx");
10 file.CheckIn(string.Empty);
11
12 }
You need to ensure that all users can see the document.
Which code segment should you add at line 11?
Correct Answer: A Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
You create a Web Part.
You need to display the number of visits to a SharePoint site collection in a label named LblVisits.
You write the following code segment. (Line numbers are included for reference only.)
01 SPSecurity.RunWithElevatedPrivileges(delegate()02 {
03 04 05
try{
06 07 08 09 10
LblVisits.Text = site.Usage.Visits.ToString();}finally{
11
}
12 });
Which code segment should you add at line 05?
Correct Answer: A Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
You have a SharePoint list named Assets that contains 1,000,000 items. The list contains a column named Urgent. Approximately 100 items have a value of True in their Urgent column.
You use the following line of code to retrieve the Assets list.
SPList assetsList = currentWeb.Lists["assets"];
You need to retrieve all of the items in the list that have a value of True in their Urgent column. You must retrieve the items in the minimum amount of time.
What should you do?
Correct Answer: D Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
You create a Web Part that calls a function named longCall.
You discover that longCall takes a long time to execute. You need to display in the Developer Dashboard how long it takes to execute longCall.
Which code segment should you use?
Correct Answer: C Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
You are creating two Web Parts named WPMaster and WPDetails.
You need to ensure that when an item is selected from WPMaster, the details of the item are displayed in
WPDetails.
What should you implement in WPMaster?
Correct Answer: D Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
You are creating a Business Connectivity Services (BCS) entity.
You need to ensure that all data returned by the entity is available in search results.
Which type of method instance should you implement?
Correct Answer: C Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
You have a SharePoint site that uses the default search settings.
You create a new Search Center.
You need to ensure that the new Search Center is the default Search Center for the site.
What should you modify?
Correct Answer: B Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
You develop a custom master page.
You need to ensure that all pages that use the master page contain a specific image.
Page developers must be able to change the image on individual pages. The master page must be
compatible with the default content page.
What should you add to the master page?
Correct Answer: D Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).